Android VideoView Landscape Orientation Problem
I am pretty new to Android and mobile development in general. I am creating an Android application that plays a video using VideoView after a button is selected. The probl开发者_如何学Pythonem is when you rotate the phone the video restarts. I know its because the activity is destroyed and recreated when it is rotated. So I just locked the video player in landscape view. But by default you have to tilt the phone to the left (right side up) to be able to see it correctly. The other way just shows the video upside down.
Is there a way to show the video correctly if the user tilts the phone to the right (left side up)? Thanks for any input.
Add android:configChanges="orientation|screenSize"
to your activity in the Android Manifest.
http://t3ch.com/blog/android_transitions/
shows how to restart video instance from where you left off when rotation occurs.
精彩评论