Android WebView isn't scrollable

前端 未结 6 422
忘掉有多难
忘掉有多难 2021-01-14 04:38

My Android WebView isn\'t scrollable.

XML Code:



        
6条回答
  •  醉话见心
    2021-01-14 05:05

    Hey I had the Same Problem with webview. It was not scrolling even with the match_parent attribute and very simple code.

    The problem is not in your xml file. Its in your Java file. In java file of that activity Override onPause AND onResume methods and iclude this code

    @Override
    protected void onResume() {
        super.onResume();
        browser.onResume();
    }
    
    @Override
    protected void onPause() {
        super.onPause();
        browser.onPause();
    }
    

    It is very important that you Pause your WebView AND then Resume it again. Hope that will solve your problem.

提交回复
热议问题