0

I have enabled video suport in my webview but, in the youtube videos, there is no fullscreen icon.

In the Manifest:

    <activity
        android:name=".MainActivity"
        android:label="@string/app_name"
        android:hardwareAccelerated="true"
        android:configChanges="keyboard|keyboardHidden|orientation|screenLayout|uiMode|screenSize|smallestScreenSize"
        android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
Alessio
  • 3,404
  • 19
  • 35
  • 48

1 Answers1

0

Please follow below link ;

Web-view with full you-tube video

You need to implement showCustomView & hideCustomView method of WebChromeClient, also You need android:hardwareAccelerated="true" in your AndroidManifest File. I am posting my sample project here. What i have done is kept one Framelayout(customContainer) in my main.xml, and adding view received in showCustomView here, and removing it in onHide. Also hiding/showing webview accordingly. Below code works perfectly on device.

Community
  • 1
  • 1
Chirag Arora
  • 816
  • 8
  • 20