Hi,
for implementing change how my app looks if screen orientation changed , I followed this steps :
1- add this line to manifest to stop activity from create:
2- in main :
3- using GetDeviceLayoutValues for detecting orientation changes:
The problem is that the app don`t show all the root width or height, I mean the ROOT width and height changes correctly but the app not showing all the page some area is missing ! it using the old dimensions for showing the corrected dimensions root , I can`t explain it well the screenshot explained it
Please notice the second screenshot that the components are displayed on their correct locations this means that the root width is correct!
your help is so appreciated
for implementing change how my app looks if screen orientation changed , I followed this steps :
1- add this line to manifest to stop activity from create:
B4X:
SetActivityAttribute(Main, android:configChanges, "orientation|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation")
B4X:
#SupportedOrientations: unspecified
B4X:
Sub timerorient_tick()
If GetDeviceLayoutValues.Width > GetDeviceLayoutValues.Height Then
CheckScrOrientation = "Landscape"
Else
CheckScrOrientation = "Portrait"
End If
If CheckScrOrientation <> StoredOrientation Then
StoredOrientation = CheckScrOrientation
Root.RemoveAllViews
Root.Width=GetDeviceLayoutValues.Width
Root.Height=GetDeviceLayoutValues.Height
Root.LoadLayout("my_layout")
End If
End Sub
Please notice the second screenshot that the components are displayed on their correct locations this means that the root width is correct!
your help is so appreciated