C cloner7801 Active Member Licensed User Longtime User Mar 4, 2017 #1 I want to change Orientation when click on button I am using this code: Code: Copy Sub SetOrientation(landscape As Boolean) Dim no AsNativeObject Dim value As Int If landscape Then value = 4 Else value = 1 no.Initialize("UIDevice").RunMethod("currentDevice", Null).SetField("orientation", value) EndSub it work correctly ! but I want my application always portrait ! but when click on button it change to landscape ! but it didnt work.. How can I create this? Thanks
I want to change Orientation when click on button I am using this code: Code: Copy Sub SetOrientation(landscape As Boolean) Dim no AsNativeObject Dim value As Int If landscape Then value = 4 Else value = 1 no.Initialize("UIDevice").RunMethod("currentDevice", Null).SetField("orientation", value) EndSub it work correctly ! but I want my application always portrait ! but when click on button it change to landscape ! but it didnt work.. How can I create this? Thanks
Erel B4X founder Staff member Licensed User Longtime User Mar 5, 2017 #2 See this thread: https://www.b4x.com/android/forum/threads/how-ti-set-pages-few-orientations.74688/ Upvote 0