hjavier Member Licensed User Longtime User Sep 25, 2013 #1 I am trying to lock the screen orientation What is the command? Activity.SetScreenOrientation(1) is not available.
I am trying to lock the screen orientation What is the command? Activity.SetScreenOrientation(1) is not available.
Erel B4X founder Staff member Licensed User Longtime User Sep 25, 2013 #2 You can lock the screen orientation by setting the #SupportedOrientations module attribute. If you want to do it dynamically then you should use Phone.SetScreenOrientation. Upvote 0
You can lock the screen orientation by setting the #SupportedOrientations module attribute. If you want to do it dynamically then you should use Phone.SetScreenOrientation.
hjavier Member Licensed User Longtime User Sep 25, 2013 #4 So I got the #SupportedOrientations attribute working and that is all I really need, but for my understanding when you use Phone.SetScreenOrientation how is Phone defined? Upvote 0
So I got the #SupportedOrientations attribute working and that is all I really need, but for my understanding when you use Phone.SetScreenOrientation how is Phone defined?
NJDude Expert Licensed User Longtime User Sep 25, 2013 #5 You have to use the Phone library: B4X: Dim ph As Phone ... Ph.SetScreenOrientation(1) ... Upvote 0
hjavier Member Licensed User Longtime User Sep 27, 2013 #6 Yes I get that but when I am declaring "Dim ph As Phone" the Phone does not come up in the auto completion mode. Upvote 0
Yes I get that but when I am declaring "Dim ph As Phone" the Phone does not come up in the auto completion mode.