Android Question Change Orientation upside down

Matt S.

Member
Licensed User
Hi
My App runs only in landscape mode. But I would like to change the screen by 180 degrees when the user rotates his tablet or mobile upside down.
 
Last edited:

Matt S.

Member
Licensed User
Hi
My App runs only in landscape mode. But I would like to change the screen by 180 degrees when the user rotates his tablet or mobile upside down.
I got it!
There is a simple way:
B4X:
#Region  Project Attributes
    #SupportedOrientations: sensorLandscape

All Available values:
behind=3, fullSensor=10, fullUser=13, landscape=0, locked=14, nosensor=5, portrait=1, reverseLandscape=8, reversePortrait=9, sensor=4, sensorLandscape=6, sensorPortrait=7, unspecified=4294967295, user=2, userLandscape=11, userPortrait=12
 
Upvote 0

Serge Bertet

Active Member
Licensed User
Longtime User
Should I ignore the:
#SupportedOrientations attribute must be set to landscape or portrait.
warning in the log tab?
My app works with B4XPages and should not work in unspecified orientation (I don't know why) ... but it is working.
There will maybe some side effects? But this is a requirement from Google Play.
 
Upvote 0

Matt S.

Member
Licensed User
Should I ignore the:
#SupportedOrientations attribute must be set to landscape or portrait.
warning in the log tab?
My app works with B4XPages and should not work in unspecified orientation (I don't know why) ... but it is working.
There will maybe some side effects? But this is a requirement from Google Play.
Each of those values is available in your application. But the plan of Google that has not yet been forced is to remove resizability and orientation restrictions in the app. This is the hint

Remove resizability and orientation restrictions in your app to support large screen devices


From Android 16, Android will ignore resizability and orientation restrictions for large screen devices, such as foldables and tablets. This may lead to layout and usability issues for your users.
We detected the following resizability and orientation restrictions in your app:

  • <activity android:name=".main" android:screenOrientation="SENSOR_LANDSCAPE" />

To improve the user experience for your app, remove these restrictions and check that your app layouts work on various screen sizes and orientations by testing on Android 16 and below.
Fortunately, that is not mandatory at this time.
 
Upvote 0
Top