Android Question How do I set screen orientation

jimseng

Active Member
Licensed User
Longtime User
Hi. I just upgraded from 1.7 to 3.2. I guess I have missed a lot of discussions during the upgrades. I used to be able to do project..activity...supported screen orientations but it isn't there any more. How do I do this now? Where is this set?
it is driving me nuts.

Cheers
 

jimseng

Active Member
Licensed User
Longtime User
I found that and set it thus: #SupportedOrientations: portrait but the screen still rotates on my Nexus 5. Have I missed something?
 
Upvote 0

jsanchezc

Member
Licensed User
Longtime User
Also you can change orientation by code
B4X:
Sub Process_Globals
   Dim phn As Phone
   ../..
End Sub

Sub Activity_Resume

   If ModoActual<>0 Then
      phn.SetScreenOrientation(1)
   Else
      phn.SetScreenOrientation(0)
   End If
../..
End Sub
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…