Issue
My problem is following.
- Application uses theme
android:Theme.NoTitleBar.Fullscreen
and there is only oneActivity
, all other views areFragment
- I have
WebView
insideViewPager Fragment
which is insideScrollView
- HTML content has input fields
- I click input field which is on bottom of
WebView
- Soft input opens, but the
Window
is not resized/panned
I've tried setting android:windowSoftInputMode="adjustResize"
or android:windowSoftInputMode="adjustPan"
in my manifest for the Activity
. Also tried setting one of those in java.
Normal EditText
inside a ScrollView
in my application does adjust pan properly so user can see where he/she is typing.
UPDATE:
If there is no working solution to get window adjust, is there a way to get WebView
think it's content is like half screen height more bigger so user could at least scroll the input visible.
Solution
Okay so this has been an issue from the very beginning and Google hasn't fixed it yet, maybe never. But from the the issue: http://code.google.com/p/android/issues/detail?id=5497 I found potential workaround for this: https://stackoverflow.com/a/19494006/1241783
I have overridden WebView
and I simply added the code for it and it is working well enough to get the window adjusted. It is possible though the code doesn't always work because of various screen heights and might need some adjustments, but in many cases it is working okay and I go with that, since it's the only working solution I have seen.
Answered By - Niko
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.