diff --git a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java index 3e94dd89d..0d5aa5a9b 100644 --- a/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java +++ b/common/src/main/java/com/yunbao/common/activity/WebViewActivity.java @@ -82,7 +82,6 @@ public class WebViewActivity extends AbsActivity { ft_title = (FrameLayout) findViewById(R.id.ft_title); v_spacing = (View) findViewById(R.id.v_spacing); mWebView = findViewById(R.id.webView); - AndroidBug5497Workaround.assistActivity(this); LinearLayout.LayoutParams params = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT); params.topMargin = DpUtil.dp2px(1); @@ -110,10 +109,11 @@ public class WebViewActivity extends AbsActivity { mWebView.loadUrl("javascript:goAnchorTab()"); } //真实屏幕高度-(ft_title的高度+导航栏高度) - int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext); + //屏蔽掉是因为在线客服页面 AndroidBug5497Workaround会失效 + /* int height = DeviceUtils.getScreenRealHeight(mContext) - DpUtil.dp2px(72) - getCurrentNavigationBarHeight(mContext); if (!navigationGestureEnabled(mContext)) { view.loadUrl("javascript:window.androidObject.setHeight(" + height + ",0,false)"); - } + }*/ } }); @@ -171,6 +171,7 @@ public class WebViewActivity extends AbsActivity { mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); } mWebView.loadUrl(url); + AndroidBug5497Workaround.assistActivity(this); if (Constants.myIntoIndex == 2) { ft_title.setVisibility(View.GONE); 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 cc3f2aec0..a52dc7781 100644 --- a/common/src/main/java/com/yunbao/common/utils/AndroidBug5497Workaround.java +++ b/common/src/main/java/com/yunbao/common/utils/AndroidBug5497Workaround.java @@ -6,6 +6,10 @@ import android.view.View; import android.view.ViewTreeObserver; import android.widget.FrameLayout; +/** + * 修复全屏WebView输入法遮挡输入框的问题 + * GitHub + */ public class AndroidBug5497Workaround { // For more information, see https://issuetracker.google.com/issues/36911528 diff --git a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java index af8c3a468..b746da228 100644 --- a/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java +++ b/main/src/main/java/com/yunbao/main/activity/ZhuangBanActivity.java @@ -36,6 +36,7 @@ import com.yunbao.common.Constants; import com.yunbao.common.activity.AbsActivity; import com.yunbao.common.event.JavascriptInterfaceEvent; import com.yunbao.common.manager.IMLoginManager; +import com.yunbao.common.utils.AndroidBug5497Workaround; import com.yunbao.common.utils.Bus; import com.yunbao.common.utils.DpUtil; import com.yunbao.common.utils.JavascriptInterfaceUtils; @@ -185,6 +186,7 @@ public class ZhuangBanActivity extends AbsActivity { mWebView.getSettings().setMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW); } mWebView.loadUrl(url); + AndroidBug5497Workaround.assistActivity(this); }