Android WebView keyboard hides input field in fragment in android

When I open WebPage in my webView , the input field is hidden from the keyboard. How can I solve this problem? Please, help.

 web_view_proposel.setWebViewClient(new myWebClient()); web_view_proposel.getSettings().setJavaScriptEnabled(true); web_view_proposel.setHorizontalScrollBarEnabled(false); web_view_proposel.setVerticalScrollBarEnabled(true); web_view_proposel.getSettings().setLoadWithOverviewMode(true); web_view_proposel.getSettings().setUseWideViewPort(true); web_view_proposel.setScrollbarFadingEnabled(false); web_view_proposel.getSettings().setBuiltInZoomControls(true); web_view_proposel.loadUrl(Url); web_view_proposel.requestFocus(View.FOCUS_DOWN); web_view_proposel.requestFocus(); web_view_proposel.setOnTouchListener(new View.OnTouchListener() { @Override public boolean onTouch(View v, MotionEvent event) { switch (event.getAction()) { case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_UP: if (!v.hasFocus()) { v.requestFocus(); } break; } return false; } }); 
+5
source share
2 answers
 android:windowSoftInputMode="stateHidden|adjustResize" 

Siddhart adds this to your manifest file, hope this works in your activity record

+1
source

Thanks to everyone .. I get a Solution. if you set the height in the stator layout statically, then the keyboard hides the text fake problem, but if u does not set the height statically, then it will work prefectly.

0
source

Source: https://habr.com/ru/post/1238354/


All Articles