yiankos1 Well-Known Member Licensed User Longtime User Jun 14, 2015 #1 Hello my friends, I want to ask you if there is anyway out there to change the orientation of the screen without enable the auto-screen orientation Code: If rotate.GetAutoRotateEnabled=0 Then rotate.SetAutoRotateEnabled(1) End If Thanks in advance! Last edited: Jun 14, 2015
Hello my friends, I want to ask you if there is anyway out there to change the orientation of the screen without enable the auto-screen orientation Code: If rotate.GetAutoRotateEnabled=0 Then rotate.SetAutoRotateEnabled(1) End If Thanks in advance!
RandomCoder Well-Known Member Licensed User Longtime User Jun 14, 2015 #2 See here...https://www.b4x.com/android/help/phone.html#phone_setscreenorientation Sorry for the short reply, typing on a tablet isn't great Upvote 0
See here...https://www.b4x.com/android/help/phone.html#phone_setscreenorientation Sorry for the short reply, typing on a tablet isn't great
yiankos1 Well-Known Member Licensed User Longtime User Jun 14, 2015 #3 Thank you very much for quick reply, but i mentioned above, that i want another way than this one: Code: If rotate.GetAutoRotateEnabled=0 Then rotate.SetAutoRotateEnabled(1) End If cause i don't want to enable that setting to user, if he doesen't enabled that setting by his own. So you gonna say me, enable auto screen orientation at Activity_resume and disable it at Activity_pause but that leads to loop when rotating phone. Cause, when phone rotates, activity first pauses and then activity resumes and does not work! Upvote 0
Thank you very much for quick reply, but i mentioned above, that i want another way than this one: Code: If rotate.GetAutoRotateEnabled=0 Then rotate.SetAutoRotateEnabled(1) End If cause i don't want to enable that setting to user, if he doesen't enabled that setting by his own. So you gonna say me, enable auto screen orientation at Activity_resume and disable it at Activity_pause but that leads to loop when rotating phone. Cause, when phone rotates, activity first pauses and then activity resumes and does not work!
RandomCoder Well-Known Member Licensed User Longtime User Jun 15, 2015 #4 Hi @yiankos1 you have misunderstood. With the phone library you can set which ever orientation you want by code. You don't need to set the auto rotate mode at all, just leave it set to whatever the user has chosen. But if your Application requires landscape for one activity just call the setscreenorientation. See my previous link for its implementation. Upvote 0
Hi @yiankos1 you have misunderstood. With the phone library you can set which ever orientation you want by code. You don't need to set the auto rotate mode at all, just leave it set to whatever the user has chosen. But if your Application requires landscape for one activity just call the setscreenorientation. See my previous link for its implementation.