B4A Question [B4XPages] Switching Phone SetScreenOrientation in B4XPages - DonManfred (first post)    Jan 22, 2021   (4 reactions) B4XPages are bound to ONE orientation. It can not be changed at runtime.
You are free to start a new activity - not using B4XPages - in another orientation. German Nur Hochformat bei Smartphone - klaus (first post)    Feb 19, 2019   (4 reactions) Das ist auch aine Möglichkeit:
Public Phone1 As Phone
Public DeviceSize As Double
DeviceSize = GetDeviceLayoutValues.ApproximateScreenSize
If DeviceSize >= 6 Then
'Tablett Code
Phone1.SetScreenOrientation(-1)
Else
'Smartphone Code
Phone1.SetScreenOrientation(1)
End If
Mit If Devi B4A Question (B4A) [RESOLVED] Problem with Interstitil on Appodeal - LucaMs (first post)    Sep 28, 2016   (2 reactions) Try to use Phone.SetScreenOrientation B4A Question Error while orientation is changed - Erel (first post)    Dec 16, 2024 Try to lock the orientation with Phone.SetScreenOrientation in Activity_Create. I don't know what is "RunActivity" but if it is a second activity then you are probably doing something wrong. 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 othe Italian [Risolto] [B4A] Gestione Portrait e Landscape - Elric (first post)    Jan 27, 2024   (2 reactions) Prova con questo progettino, anche se è da miglorare. Si basa su questi comandi: Dim p As Phone p.SetScreenOrientation(0) 'Landscape p.SetScreenOrientation(1) 'Portrait p.SetScreenOrientation(-1) 'Unspecified B4A Question Portrait orientation - Camera Landscape - William Lancee (first post)    Sep 21, 2022   (1 reaction) At the top of the Activity try setiing in #Region Project Attributes
#SupportedOrientations: unspecified
And then as first line in Actiity_Create add
Dim ph As Phone: ph.SetScreenOrientation(7)
When I tried this, I could set the orientation in code. B4A Question SetScreenOrientation & Layout with larger phone screens - aaronk    Oct 29, 2019 If GetDeviceLayoutValues.ApproximateScreenSize >= 7 Then
phone1.SetScreenOrientation(0)
Activity.LoadLayout("landscape")
Log("** tablet **")
Else
phone1.SetScreenOrientation(1)
Activity.LoadLayout("portrait")
Log("** phone **")
End If B4A Question Writing an App to execute a few clicks on the Phone - mangojack (first post)    Sep 07, 2024   (1 reaction) Yes. Yes See what you can do using the Phone Library... 156683 Dim p As Phone p.SetVolume(p.VOLUME_MUSIC, 15, True) 'Max Volume p.SetScreenOrientation(0) ' Landscape p.SetScreenBrightness(1) ' (-1 Auto did not work , 1 Brightest did work) B4A Question B4Xpages - Orientations: landscape 180 degreess rotated - William Lancee (first post)    Mar 21, 2021   (3 reactions) I have used the phone library and put the following in Main Activity. It works for me.
Sub Activity_Create(FirstTime As Boolean)
'Comment out #SupportedOrientations: in Project Attributes , actually this doesn't matter, it is superseded by code.
Dim ph As Phone
ph.SetScreenOrientation Page: 1   2   3   4   5   6   7   Powered by ColBERT |