user678229
user678229

Reputation: 301

Launching android app in Landscape mode

I want my app to be displayed only in Portrait mode. I setRequestedOrientation (ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);) as long as the app is launched in Portrait mode and then change it to landscape when the app is running. The issue is, if I launch the app in Landscape mode, it displays the Splash Screen for a second and then goes all black and again displays the Splash Screen. this keeps going on forever and never proceeds to the next screen. any help on resolving this issue is much appreciated. thanks.

Upvotes: 1

Views: 1866

Answers (3)

success_anil
success_anil

Reputation: 3658

I don know what code have you written .. probably if you can share few snippet of code where you are calling splashscreen and after some timeinterval you call another activity ... we could provide you a solution.

Upvotes: 0

Ofershap
Ofershap

Reputation: 717

Recheck your Manifest.xml - who is the launcher activity and who is the default. also recheck which activity you call from the splash screen. maybe the name has changed for some reason.

If not, try using this answer: Android - switching between landscape and portrait mode makes Intent lose values

Upvotes: 0

Mads Lee Jensen
Mads Lee Jensen

Reputation: 4648

You can it inside the manifest on your activity

<activity android:name=".MainActivity" android:screenOrientation="portrait" />

Upvotes: 2

Related Questions