diff --git a/common/src/main/java/com/yunbao/common/activity/AbsActivity.java b/common/src/main/java/com/yunbao/common/activity/AbsActivity.java
index c25d8d07d..59851d060 100644
--- a/common/src/main/java/com/yunbao/common/activity/AbsActivity.java
+++ b/common/src/main/java/com/yunbao/common/activity/AbsActivity.java
@@ -383,6 +383,12 @@ public abstract class AbsActivity extends AppCompatActivity {
}
}
public boolean isKefu(String url){
+ if(url.contains("kefu")){
+ return true;
+ }
+ if(url.contains("https://newkf.yaoulive.com/")){
+ return true;
+ }
return url.startsWith("https://kefu.yaoulive.com");
}
}
diff --git a/common/src/main/java/com/yunbao/common/utils/AndroidBug5497Workaround.java b/common/src/main/java/com/yunbao/common/utils/AndroidBug5497Workaround.java
index 284d2f9fa..ef2fb8c84 100644
--- a/common/src/main/java/com/yunbao/common/utils/AndroidBug5497Workaround.java
+++ b/common/src/main/java/com/yunbao/common/utils/AndroidBug5497Workaround.java
@@ -9,6 +9,8 @@ import android.view.ViewTreeObserver;
import android.view.inputmethod.InputMethodManager;
import android.widget.FrameLayout;
+import com.yunbao.common.activity.AbsActivity;
+
/**
* 修复全屏WebView输入法遮挡输入框的问题
* GitHub
@@ -72,7 +74,7 @@ public class AndroidBug5497Workaround {
int heightDifference = usableHeightSansKeyboard - usableHeightNow;
if (heightDifference > (usableHeightSansKeyboard / 4)) {
// keyboard probably just became visible
- frameLayoutParams.height = usableHeightSansKeyboard - heightDifference;
+ frameLayoutParams.height = usableHeightSansKeyboard - heightDifference - AbsActivity.getCurrentNavigationBarHeight((Activity) mChildOfContent.getContext());
} else {
// keyboard probably just became hidden
frameLayoutParams.height = usableHeightSansKeyboard;
diff --git a/main/src/main/java/com/yunbao/main/activity/CustomerServiceWebViewActivity.java b/main/src/main/java/com/yunbao/main/activity/CustomerServiceWebViewActivity.java
index a7407ff0e..2a0149b37 100644
--- a/main/src/main/java/com/yunbao/main/activity/CustomerServiceWebViewActivity.java
+++ b/main/src/main/java/com/yunbao/main/activity/CustomerServiceWebViewActivity.java
@@ -81,9 +81,8 @@ public class CustomerServiceWebViewActivity extends AbsActivity {
if (getNavigationBarHeight(mContext) != 0) {
params.bottomMargin = getNavigationBarHeight(mContext);
}*/
- AndroidBug5497Workaround.assistActivity(rootView);
//mWebView.setLayoutParams(params);
- mWebView.setOverScrollMode(View.OVER_SCROLL_NEVER);
+ // mWebView.setOverScrollMode(View.OVER_SCROLL_IF_CONTENT_SCROLLS);
mWebView.setWebViewClient(new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
@@ -172,13 +171,12 @@ public class CustomerServiceWebViewActivity extends AbsActivity {
String appCachePath = mContext.getCacheDir().getAbsolutePath();
// mWebView.getSettings().setAppCachePath(appCachePath);
mWebView.getSettings().setAllowFileAccess(true);
- mWebView.getSettings().setUseWideViewPort(true); // 关键点
+ //mWebView.getSettings().setUseWideViewPort(true); // 关键点
mWebView.getSettings().setAllowFileAccess(true); // 允许访问文件
- if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
- mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
- }
+ mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW);
mWebView.loadUrl(url);
+ AndroidBug5497Workaround.assistActivity(mWebView);
}
private void openImageChooserActivity(ValueCallback valueCallback) {
@@ -250,7 +248,7 @@ public class CustomerServiceWebViewActivity extends AbsActivity {
finish();
return;
}
- ToastUtil.showDebug("调用js userBackShowPraise");
+ ToastUtil.show("调用js userBackShowPraise");
mWebView.loadUrl("javascript:userBackShowPraise()");
}