0

I want to force my game to run in landscape-mode, and all I can find are xml-tuts, but im not using xml, im using SurfaceView. So my question is, how do I change and force my game to run as landscape? I know about the "android:screenOrientation="landscape"", but when I try this my game crashed at startup, and it works just fine in portrait.

please let me know what and where and how to make this work :)

tank you!

Green_qaue
  • 3,561
  • 11
  • 47
  • 89
  • _I know about the "android:screenOrientation="landscape"", but when I try this my game crashed at startup_ Perhaps you can post the crash log, because this is the correct and most elegant way to achieve forced landscape. Your crash will likely return even if lanscape is set programmatically. – devunwired Jul 03 '12 at 18:01
  • Try to set the orientation on your layout in your code as well as in your Manifest. – Kurty Jul 03 '12 at 18:04
  • it does work through the manifest about 50% of the time, the other 50% I get an error where I draw my background in the onDraw-method – Green_qaue Jul 03 '12 at 19:24
  • try posting the part of the code where you get the error on your onDraw to help you fix that :) – Raykud Jul 03 '12 at 19:32
  • If it's failing 50% of the time, it's caused by something else that's only being done 50% of the time – Cruceo Jul 03 '12 at 19:44
  • No cus if I run it in portrait it works 100% of the time. Please some1 help with this, really need to run landscape – Green_qaue Jul 03 '12 at 21:40

0 Answers0