修复测试反馈问题

This commit is contained in:
2023-10-30 18:25:16 +08:00
parent f36c4706e4
commit 9aa8b22d99
40 changed files with 694 additions and 206 deletions

View File

@@ -40,6 +40,7 @@ public class JavascriptInterfaceUtils {
//判断是页面关闭还是网页回退
private boolean pageClose = false;
private boolean dialogClose = false;
private boolean permitSetHigh =true;
//同名activity跳转问题
private boolean LiveZhuangBana = true;
private static JavascriptInterfaceUtils sInstance;
@@ -59,6 +60,14 @@ public class JavascriptInterfaceUtils {
return this;
}
/**
* 允许js修改webview高度
*/
public JavascriptInterfaceUtils setPermitSetHigh(boolean isPermit){
this.permitSetHigh=isPermit;
return this;
}
public JavascriptInterfaceUtils setmContext(Activity mContext, WebView mWebView) {
this.mContext = mContext;
this.mWebView = mWebView;
@@ -503,6 +512,9 @@ public class JavascriptInterfaceUtils {
if ("0".equals(height)) {
return;
}
if(!permitSetHigh){
return;
}
Handler handler = new Handler(Looper.getMainLooper());
handler.post(() -> {
ViewGroup.LayoutParams params = mWebView.getLayoutParams();