Skip to main content

Posts

Showing posts from September, 2021

Webview နှင့် Videoview မှာ ဗီဒီယို အကျယ်ချဲ့ကြည့်လို့မရတဲ့ဗျဿနာ ‌ေြဖရှင်ူရန်ကုဒ်

Code 1 } public class CustomWebClient extends WebChromeClient { private View mCustomView; private WebChromeClient.CustomViewCallback mCustomViewCallback; protected FrameLayout frame; // Initially mOriginalOrientation is set to Landscape private int mOriginalOrientation = android.content.pm .ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE; private int mOriginalSystemUiVisibility; // Constructor for CustomWebClient public CustomWebClient() {} public Bitmap getDefaultVideoPoster() { if (MainActivity.this == null) { return null; } return BitmapFactory.decodeResource(MainActivity.this.getApplicationContext().getResources(), 2130837573 ); } public void onShowCustomView(View paramView, WebChromeClient.CustomViewCallback viewCallback) { if (this.mCustomView != null) { onHideCustomView(); return; } this.mCustomView = paramView; this.mOriginalSystemUiVisibility = MainActivity.this.getWindow().getDecorView().getSystemUiVisibility(); // When CustomView is shown screen orientation c