I know there is heaps on here related to the virtual keyboard in Android, but I just cant seem to figure out how to achieve a solution to my problem.
For those that are not familiar with AdjustPan
and AdjustResize
you can check out what they are/do here - Difference between adjustResize and adjustPan in android?
What I am trying to achieve is the AdjustPan
result in which my webview is not resized, but scrolls to the input box instead as I have submit/cancel buttons that are position:absolute
to the bottom of the screen. When I use the AdjustPan
setting, the keyboard opens up but covers my input and doesn't scroll the webview to the input.
On the other hand when I use the AdjustResize
option, the position:absolute
buttons from the footer cover the last few inputs as there is quite a lot of content to fit in half the screen size.
Currently my Activity looks like this
<activity android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale" android:label="@string/activity_name" android:launchMode="singleTop" android:name="MainActivity" android:screenOrientation="portrait" android:theme="@android:style/Theme.Black.NoTitleBar" android:windowSoftInputMode="adjustResize">
I am trying to avoid the Javascript listener solutions as they seem a bit hackery and from my experience usually don't provide a seamless look and feel.