• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Webview portrait lock, but allow landscape in video?

I have android:screenOrientation="portrait" to disable landscape mode, but I need full screen videos to allow landscape. Is this possible to overcome?
 
Have you your screenOrientation on applicationElement?
When yes change it to activity element
http://stackoverflow.com/questions/4885620/force-portrait-orientation-mode.
Java:
<activity
   android:screenOrientation="portrait"
   android:configChanges="orientation|keyboardHidden">
</activity>

You could try it to solve it over playing your videos directly into the portrait view.
Java:
<VideoView
    android:id="@+id/opening_video"
    android:layout_width="480px"
    android:layout_alignParentRight="true"
    android:layout_alignParentLeft="true"
    android:layout_alignParentTop="true"
    android:layout_alignParentBottom="true"
    android:layout_height="800px"
    android:orientation="vertical" />

<ImageButton
    android:id="@+id/imageButton1"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:src="@drawable/transparent_button"
    android:contentDescription="@string/back_button_desc"
    android:background="@android:color/transparent" />
Here is also the link for the information
http://stackoverflow.com/questions/13116538/android-videoview-not-playing-portrait-orientation?rq=1.
Had the same problem and solved it like this.
Hope it helps you
 
Back
Top Bottom