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

Apps Android App and screen orientation

jusjctin

Lurker
Hi, I was wondering if there was any java code that will allow you to make sure each window in your app stays in portrait despite the user flipping the phone to landscape. I already tried inserting android:screenOrientation="portrait" into both my android manifest and into every single XML file I had but unfortunately only some stayed in portrait and others still flipped to landscape. Please help and thanks!
 
your manifest should look like this
Code:
<activity
            android:name=".HList"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".Info"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".MapPage"
            android:screenOrientation="portrait" >
 
your manifest should look like this
Code:
<activity
            android:name=".HList"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".Info"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".MapPage"
            android:screenOrientation="portrait" >


Ooooooh, ok. Thanks! I thought you had to do that in each individual XML file. I will go back and do this in the manifest instead. Thanks Lemoncog and JiMMar!
 
Back
Top Bottom