修复测试反馈问题
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user