forcing my app to stay in landscape mode

You must Login before you can answer or comment on any questions.

Hi, in my android app i need to force all my app to stay in landscape how can i do this?

2 Answers

Accepted Answer

Hello, Just follow this steps and get it done:

One option to get Splash screen in landscape mode is goto android project folder ---> build ---- > android ------> here you can see AndroidManifest.xml file .

Copy AndroidMenifest.xml file text and put in AndroidManifest.custom.xml file in same folder where AndroidManifest.xml file is kept and in activity tag write android:screenOrientation="landscape" for landscape mode and replace android:configChanges="keyboardHidden|orientation" to android:configChanges="keyboardHidden" in whole file in each activity .

Example

<activity>
android:configChanges="keyboardHidden"
android:screenOrientation="landscape"
</activity>
This will solve your problem.

— answered 10 months ago by Moiz Chhatriwala
answer permalink
2 Comments
  • thanks to everyone :)

    — commented 10 months ago by Raffaele Chiocca

  • if you use 1.8.x or later version of Ti SDK then this gives the warning so instead of this copy your manifest file and do the changes then create one folder platform/android folders and put the AndroidManifest.xml file in that then clean your project from project menu and run.

    reffer this link :

    — commented 10 months ago by Moiz Chhatriwala

Hi Raffaele, In android if you want that your application run only in a single mode(landscape in your case), then you need to place a custom android menifest file with your android menifest xml file and replace orientation to landscape at all places.for more details you can refer this link. I hope this will help you.

Your Answer

Think you can help? Login to answer this question!