1

I am making a application in code name one, and as my requirement I want my screen fix.

like only portrait view or landscape view. How we can do it?

Please help.

vikrant kumar
  • 208
  • 2
  • 14

1 Answers1

4

Try Display.getInstance().canForceOrientation() and Display.getInstance().lockOrientation(boolean). Notice that not all devices support orientation locking.

Shai Almog
  • 51,749
  • 5
  • 35
  • 65