Ccna final exam - java, php, javascript, ios, cshap all in one. This is a collaboratively edited question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
Tuesday, April 17, 2012
I want my android application to be only run in portrait mode?
I want my android application to be only run in portrait mode ? How to do that?
With android:configChanges="orientation" you tell Android that you will be responsible of the changes of orientation. android:screenOrientation="portrait" you set the default orientation mode.
In the manifest, set this for all your activities:
ReplyDelete<activity android:name=".YourActivity"
android:configChanges="orientation"
android:screenOrientation="portrait"/>
Let me explain:
With android:configChanges="orientation" you tell Android that you will be responsible of the changes of orientation.
android:screenOrientation="portrait" you set the default orientation mode.
In Android Manifest File, put attribute for your <activity> that android:screenOrientation="portrait"
ReplyDelete