Commit 579a2240 by amateur

1

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