|
@@ -343,14 +343,14 @@ public class ScHtmlFragment extends BaseFragment<FgScHomeWebBinding> implements
|
|
|
return;
|
|
|
}
|
|
|
//为了规避H5页面的错误状态页比如404页面显示在了首页,所以这里在收到相应回调后更高布局样式
|
|
|
- changeWebViewParentHeight();
|
|
|
+ changeWebViewParentHeight(height);
|
|
|
showWebView();
|
|
|
}
|
|
|
|
|
|
- private void changeWebViewParentHeight() {
|
|
|
+ private void changeWebViewParentHeight(int height) {
|
|
|
if (mViewBinding != null) {
|
|
|
FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) mViewBinding.viewParent.getLayoutParams();
|
|
|
- layoutParams.height = ViewGroup.LayoutParams.WRAP_CONTENT;
|
|
|
+ layoutParams.height = SizeUtils.dp2px(height);
|
|
|
layoutParams.topMargin =SizeUtils.dp2px(12);
|
|
|
mViewBinding.viewParent.setLayoutParams(layoutParams);
|
|
|
}
|