1

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.

user678229
  • 301
  • 3
  • 21

3 Answers3

2

You can it inside the manifest on your activity

<activity android:name=".MainActivity" android:screenOrientation="portrait" />
Mads Lee Jensen
  • 4,570
  • 5
  • 36
  • 53
  • 1
    I have this set in my main activity in the manifest file. It shows the screen in portrait mode, the issue is it keeps showing the splash screen and then a blank screen, but never proceeds after that. – user678229 Jun 30 '11 at 14:15
0

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

Community
  • 1
  • 1
Ofershap
  • 687
  • 2
  • 7
  • 22
0

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.

success_anil
  • 3,659
  • 3
  • 27
  • 31