Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

html select tag in webview seems to be problematic

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!

like image 790
Ludovico Loreti Avatar asked Nov 18 '25 10:11

Ludovico Loreti


1 Answers

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.

like image 94
jack1818 Avatar answered Nov 20 '25 00:11

jack1818