Android Tutorial ExoPlayer - full screen feature

1627205322656.png



1627205353669.png


This example demonstrates how you can add a full screen button to a video. Clicking on the button, starts a new landscape activity and it then uses the native switchTargetView method to reuse the same player in the new SimpleExoPlayerView.
There is also some calculations involved with adding the button based on the actual video dimension.
Don't miss the manifest editor code that locks the second activity in landscape.
 

Attachments

  • Project.zip
    16.2 KB · Views: 587

Jim McDougal

Member
Licensed User
SetActivityAttribute(FullScreen, android:screenOrientation, fullSensor)
Hi Erel,

I added this to the manifest file via the manifest editor and no effect (but the parameter android:screenOrientation="fullSensor">did show in the manifest file for the Main activity). Then I set #SupportedOrientations: fullSensor in the #Region Project Attributes of my Main activity and all activities in the manifest show android:screenOrientation="fullSensor"> but the status bar is still showing in landscape orientation. I've attached the manifest file. Any suggestions?

Thanks,

Jim
 

Attachments

  • AndroidManifest.xml
    1.4 KB · Views: 86
Top