Android ScrollView嵌套WebView出现底部空白问题

【Android ScrollView嵌套WebView出现底部空白问题】宝剑锋从磨砺出,梅花香自苦寒来。这篇文章主要讲述Android ScrollView嵌套WebView出现底部空白问题相关的知识,希望能为你提供帮助。
    @javascriptInterface
    public void resize(final float height) {         WebViewActivity.this.runOnUiThread(new Runnable() {             @Override             public void run() {                 //Toast.makeText(getActivity(), height + "", Toast.LENGTH_LONG).show();                     RelativeLayout.LayoutParams layoutParams = (RelativeLayout.LayoutParams)mWebView1.getLayoutParams();                     layoutParams.width = getResources().getDisplayMetrics().widthPixels;                     layoutParams.height = (int) (height * getResources().getDisplayMetrics().density);                       mWebView.setLayoutParams(layoutParams);             }         });     }   or     @javascriptInterface   public void resize(final float height) {   getActivity().runOnUiThread(new Runnable() {     @Override     public void run() {     //Toast.makeText(getActivity(), height + "", Toast.LENGTH_LONG).show();     mWebView.setLayoutParams(new LinearLayout.LayoutParams(getResources().getDisplayMetrics().widthPixels, (int) (height * getResources().getDisplayMetrics().density)));     }   });   }       mWebView.setWebViewClient(new WebViewClient() {     @Override     public void onPageFinished(WebView view, String url) {     mWebView.loadUrl("javascript:App.resize(document.body.getBoundingClientRect().height)");     super.onPageFinished(view, url);     }   });   mWebView.addJavascriptInterface(this, "App");

    推荐阅读