调整WebView

This commit is contained in:
zlzw 2023-06-06 14:41:53 +08:00
parent cd2e176f0a
commit c53757c64b
2 changed files with 2 additions and 0 deletions

View File

@ -67,5 +67,6 @@
<WebView <WebView
android:id="@+id/webView" android:id="@+id/webView"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_marginBottom="15dp"
android:layout_height="match_parent" /> android:layout_height="match_parent" />
</LinearLayout> </LinearLayout>

View File

@ -102,6 +102,7 @@ public class ZhuangBanActivity extends AbsActivity {
mWebView = new WebView(mContext); mWebView = new WebView(mContext);
LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
params.topMargin = DpUtil.dp2px(1); params.topMargin = DpUtil.dp2px(1);
params.bottomMargin = DpUtil.dp2px(15);
mWebView.setLayoutParams(params); mWebView.setLayoutParams(params);
mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER); mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
rootView.addView(mWebView); rootView.addView(mWebView);