6

When I open WebPage into my webView,the input field is hidden by 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;
            }
        });
Sourab Sharma
  • 2,940
  • 1
  • 25
  • 38
Siddharth Khetan
  • 171
  • 1
  • 2
  • 10

2 Answers2

0
android:windowSoftInputMode="stateHidden|adjustResize"

Siddhart add this to your manifest file, hope this will work in your activity entry

Saurabh sharma
  • 369
  • 2
  • 13
0

Thanks All ..I get the Solution . if u set the height in drawer layout statically then keyboard hide textfeild problem occur but if u not set height statically then it will work prefectly..

Siddharth Khetan
  • 171
  • 1
  • 2
  • 10