Commit 579a2240 by amateur

1

1 parent fc7423f6
...@@ -52,27 +52,19 @@ public class MyWebChromeClient extends WebChromeClient { ...@@ -52,27 +52,19 @@ public class MyWebChromeClient extends WebChromeClient {
@Override @Override
public void onShowCustomView(View view, IX5WebChromeClient.CustomViewCallback customViewCallback) { public void onShowCustomView(View view, IX5WebChromeClient.CustomViewCallback customViewCallback) {
if (null != webView.getX5WebViewExtension()) {
super.onShowCustomView(view, customViewCallback);
} else {
if (this.activity.getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { if (this.activity.getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
this.activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); this.activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} }
showCustomView(view, customViewCallback); showCustomView(view, customViewCallback);
} }
}
@Override @Override
public void onHideCustomView() { public void onHideCustomView() {
if (null != webView.getX5WebViewExtension()) {
super.onHideCustomView();
} else {
if (this.activity.getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) { if (this.activity.getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) {
this.activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); this.activity.setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
} }
hideCustomView(); hideCustomView();
} }
}
/** /**
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!