Phone. SetScreenOrientation (Orientation As Int)Changes the current activity orientation. This method cannot be called from a service module.Orientation - -1 for unspecified, 0 for landscape and 1 for portrait. B4A Question [B4XPages] Switching Phone SetScreenOrientation in B4XPages - GabrielM (first post)    Jan 22, 2021 Many thanks Manfred
Thats what I will do, then.
Have a great weekend... B4A Question Phone.SetScreenOrientation(x) - alfcen    Apr 5, 2011 .
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... B4A Question Phone.SetScreenOrientation inconsistent? - doncx (first post)    Jul 4, 2016 orientation. You can find it with the code I posted here: https://www.b4x.com/android/forum/threads/sensor-orientation.36828/#post-216794
That was it, Erel. Thanks for the tip - I was unfamiliar with the concept of DefaultOrientation. All is well, and I'll try to better follow posting protocol in... B4A Question SetScreenOrientation & Layout with larger phone screens - aaronk    Oct 29, 2019 .SetScreenOrientation(0)
Activity.LoadLayout("landscape")
Log("** tablet **")
Else
phone1.SetScreenOrientation(1)
Activity.LoadLayout("portrait")
Log("... the following?
If GetDeviceLayoutValues.ApproximateScreenSize >= 7 Then
phone1.SetScreenOrientation(0....SetScreenOrientation(1)
Activity.LoadLayout("portrait")
Log("** phone **"... B4A Question [SOLVED] Phone library :: SetScreenOrientation - antofer (first post)    Mar 17, 2015 this version I did not appear in the search results
looking to download... B4A Question Newbie Question : How can I change the phone settings? - Sam Koh    Jul 25, 2023 I realized that the following settings will be gone once I quit the App. Is there a way to keep these phone settings permanently until I next change them? Dim myPhone As Phone myPhone.SetScreenOrientation (0) myPhone.SetVolume (myPhone.VOLUME_SYSTEM,15,True) myPhone.SetScreenBrightness (-1)... B4A Question How to freeze the orientation of an Activity - Reflection? - Gary Milne    Mar 23, 2015 I have an app that mostly uses Landscape but has one Portrait activity. I need to be able to set and freeze the orientation on a per activity basis. I've tried Phone.SetScreenOrientation as described here but that does not lock the orientation and it still changes on a device rotation. There is a thread that describes how to do this (how to lock orientation during runtime) and it seems like it would be a fit for Reflection but I don't have a good handle on Reflection semantics... B4A Question CameraExClass and orientation - heldenssjoerd (first post)    Feb 20, 2024 I think I've found a workaround. In Main we set the #SupportedOrientations: unspecified 'used to be portrait In every view/activity that should not rotate we set, in the create, the following Dim phone As Phone phone.SetScreenOrientation(1) Then there is no rotation possible. All other activities and views need to be checked and tested.... B4A Question Lock orientation in manifest or in Project Attributes. How to - Gianni Sassanelli (first post)    Apr 15, 2021
You can try something like:
Dim phone As Phone
phone.SetScreenOrientation(0)
thank's Jeffrey but don't solve.
i know phone.SetScreenOrientation(0) but i want to lock portrait or landscape mode to prevent user to change orientation that reset any value of any activity.... B4A Question How is the phone held? - grafsoft    Jan 24, 2016 I need to set the screeen orientation with phone.setscreenorientation But I want to know how the phone is held, i.e. what the screen orientation (portrait, landscepe ...) would be if I did not set the screen orientation. I hope it is understandable what I am writing.... Page: 1   2   3   4   5   6   7   |