4

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?

2 Answers2

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