On the main activity I set the #SupportedOrientations: portrait, but I need to enable rotation on another activities. How to do that ? I tried to copy that setting to the activity, but it said "attribute not supported". Please help, thanks.
Great barx ! How could I'm not remembered that.
code below (in case beginners like me need it ) :
B4X:
Sub Globals
Dim ph as phone
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
ph.SetScreenOrientation(-1) ' -1 for unspesified, 0 for landscape and 1 for portrait
End Sub
It will allow only modified activity to freely rotate, where as the other remains as main activity setting.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.