In my current app, whenever I search something in the webview the keyboard pops up as expected. however, when I dismiss the keyboard and reload the page it cuts off the webview content behind the keyboard(shows as blank for the area behind the keyboard). Is there a way to make it such the even when the keyboard is up the area behind the keyboard is never blank/cut off or a fix for this issue if anyone else had to deal with a similar problem before?
Asked
Active
Viewed 1,043 times
4
-
`android:windowSoftInputMode="adjustResize|stateVisible|stateAlwaysHidden" ` – IntelliJ Amiya Feb 02 '16 at 10:50
-
where do i add that? in manifest or the layout – Feb 02 '16 at 15:49
-
Yes ,You can put this in your manifest section . – IntelliJ Amiya Feb 03 '16 at 05:42
-
when I do ,it affects my scrolling capability.I am unable to scroll on the navigation panel – Feb 03 '16 at 15:24
2 Answers
1
Go to your manifest and add this to your Activity
<activity
android:windowSoftInputMode="adjustPan">
</activity>

Drilon Blakqori
- 2,796
- 2
- 17
- 25
0
Did you try this one
getWindow().getDecorView().setBackgroundColor(
android.R.color.transparent);
after
setContentView(R.layout.yourlayout);

Nitesh
- 318
- 3
- 16
-
how does the above code affect the inputwindowmanager in any way? i have a function to hidekeyboard before loading the new view upon touch webView.setWebViewClient(WebViewClient); webView.setOnTouchListenerWebViewClient); webView.setOnTouchListener(new View.OnTouchListener() { public boolean onTouch(View v, MotionEvent event) { hideSoftKeyboard(); hideSoftKeyboard(View v); return false; } }); but that doesnt work upon first click – Feb 03 '16 at 15:23