Text Input on android phone is not in view when the keyboard for webview comes up?
I have a webview on an android phone that is a registration form and it contains some fields such as first name, last name, user name, password, etc... When focus o开发者_StackOverflow社区n the first name input field for example, the keyboard pops up, but the input goes out of view, it still has focus though. Is there a way to keep it in view or is this a bug?
This seems to be a problem common to Android applications. The application does not scroll the view such that the input field under focus is visible when the soft keyboard appears. There might be a solution, but it is something you'd have to implement and not a bug (per se).
I found this answer here : https://stackoverflow.com/a/5097539/1498996
Add this to your activity tag in the AndroidManifest.xml
:
<activity android:windowSoftInputMode="adjustNothing"
//other flags
/>
It worked for me.
精彩评论