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 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 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 B4A Question (B4A) [RESOLVED] Problem with Interstitil on Appodeal - LucaMs (first post)    Sep 28, 2016   (2 reactions) Try to use Phone.SetScreenOrientation 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 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 SetScreenOrientation & Layout with larger phone screens - aaronk    Oct 29, 2019 Hi,
In my app I am detecting if the user is using a phone or a tablet and then showing a different layout based on what device they are using.
I am detecting the screen size and showing the layout like the following:
If GetDeviceLayoutValues.ApproximateScreenSize > 6 Then
phone1.SetScreenOri B4A Question Programmatically inhibit screen rotation from a service - vangogh (first post)    Mar 11, 2024 I set
#Region Project Attributes
#SupportedOrientations: landscape
#End Region
so the device DOES NOT rotate automatically when you rotate the device
and then I manage the rotation by code, when I want e.g.
Dim p As Phone
p.SetScreenOrientation(1) 'portrait B4A Code Snippet screen orientation - constant values - Dave O    Jul 11, 2021   (8 reactions) Just finishing reading some threads about setting screen orientation, and noticed that some threads were just using numeric values, and others were using constants with the wrong numeric values (e.g. sensorPortrait is 7, not 9). So I looked up the Android dev docs and compiled this list of constant Page: 1   2   3   4   5   6   7   Powered by ColBERT |