开发者

Android disable webview input

开发者 https://www.devze.com 2023-03-22 00:51 出处:网络
I have a layout that features a webview and various UI elements on to开发者_JAVA百科p of the webview. This is a relativelayout.

I have a layout that features a webview and various UI elements on to开发者_JAVA百科p of the webview. This is a relativelayout.

Currently, no matter how many elements are visible on top of the webview, all scrolling will scroll the webview, it can still accept clicks and more. I want to conditionally disable these features of the webview

I am using myWebview.setClickable(false) but this seems to have no effect

insight appreciated


I'm not confident about this, but perhaps forcing the WebView to drop its focus will do. Try myWebview.clearFocus(). Let me know if that worked or not. I'm not at my computer right now, otherwise I would know. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号