html select tag in webview seems to be problematic

2019-07-21 20:44发布

i've done an app with a simple webview; when i open from my webview the page "search.php" and i touch the html select to choose from a different type of words.. but...Houston! We gotta problem! :D When i write what i need in the input field it's all right, but when i TOUCH (only touch) the select field to choose what i need (i can choose few type of locals, like: bar, disco, restaurant..etc...) my app crash! Im asking WHY? If i put the same html select in another page (contact.php for example) app DOESN'T crash.. what's the problem?

Here, the screenshot i've done with my galaxy s2. Have a look, while i was touching the html select tag (you can see it, because it's light blue) i've done the screenshot, and obviusly app crashed. LOL!

1条回答
爷、活的狠高调
2楼-- · 2019-07-21 20:57

Make sure your WebView is initialized with the Activity context. I ran into this problem before and it was because we were using the wrong context. The Activity in which the WebView runs should be passed into the constructor of the WebView.

查看更多
登录 后发表回答