Phone.SetScreenOrientation(x)

alfcen

Well-Known Member
Licensed User
Longtime User
In an attempt to change screen orientation while an activity loads, my phone rebooted itself.

B4X:
Sub Activity_Create(FirstTime As Boolean)
    p.SetScreenOrientation(0)   
End Sub

Is it reasonable to assume that p.SetScreenOrientation(x) must not be placed inside Activity_Create, Activity_Resume and Activity_Pause?

Inside Activity_Click the screen rotates as expected.
 

kickaha

Well-Known Member
Licensed User
Longtime User
As I understand it, if you put it in Activity_Create, Activity_Resume or Activity_Pause you would create an endless loop as changing the orientation calls these.
 
Upvote 0
Top