prince_j325 Member Apr 20, 2020 #1 Good day Experts,/ For example i have layout1 and layout2. Layout1 is portrait orientation. How to make layout2 orientation into landscape? This is the Attributes on my Main Module B4X: #Region Project Attributes #ApplicationLabel: COVID19 Data Tracker #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: portrait #CanInstallToExternalStorage: False #End Region
Good day Experts,/ For example i have layout1 and layout2. Layout1 is portrait orientation. How to make layout2 orientation into landscape? This is the Attributes on my Main Module B4X: #Region Project Attributes #ApplicationLabel: COVID19 Data Tracker #VersionCode: 1 #VersionName: 'SupportedOrientations possible values: unspecified, landscape or portrait. #SupportedOrientations: portrait #CanInstallToExternalStorage: False #End Region
Gandalf Member Licensed User Longtime User Apr 21, 2020 #3 If you want to check in which orientation is the phone now and load specific layout, you can use something like this: B4X: If Activity.Width > Activity.Height Then Activity.LoadLayout("landscape") Else Activity.LoadLayout("portrait") End If There's more complex method to catch orientation changes using sensors: https://www.b4x.com/android/forum/threads/orientation-and-accelerometer.6647/page-6#post-476271 Last edited: Apr 21, 2020 Upvote 0
If you want to check in which orientation is the phone now and load specific layout, you can use something like this: B4X: If Activity.Width > Activity.Height Then Activity.LoadLayout("landscape") Else Activity.LoadLayout("portrait") End If There's more complex method to catch orientation changes using sensors: https://www.b4x.com/android/forum/threads/orientation-and-accelerometer.6647/page-6#post-476271
prince_j325 Member Apr 21, 2020 #4 My second Layout is a Chart and design for landscape orientation. Upvote 0