Pray, what is different if user from 'Portrait' mode rotates the mobile Left of Right ?did you read my question? i need two orientation possibilities, denying landscape right. Your code does not help because i need to deny, not to set
i only need portrait + landscape left. That s itPray, what is different if user from 'Portrait' mode rotates the mobile Left of Right ?
Can you show your app screen images in different orientations ?i only need portrait + landscape left. That s it
sorry but how an image could help? I m just asking how to deny landscape right side orientation.....Can you show your app screen images in different orientations ?
We may suggest some remedy for it.
Set another Orientation if the orientation set is not allowed.sorry but how an image could help? I m just asking how to deny landscape right side orientation.....
I think we do not have such option in Android.sorry but how an image could help? I m just asking how to deny landscape right side orientation.....
so how to allow only portrait and landscape left? :/Set another Orientation if the orientation set is not allowed.
' SetOrientation = 1 'Portrait
' SetOrientation = 0 'Landscape
' SetOrientation = 9 'Reverse Portrait
' SetOrientation = 8 'Reverse Landscape
This are all possibilities. If you want to deny 8 then set 0 if 8 is set instead.
You did read my answer? Set a NEW one if the wrong one is setso how to allow only portrait and landscape left? :/
so i can set more than one orientation?You did read my answer? Set a NEW one if the wrong one is set
Reverse Screen Orientation and Compass
Sorry, if I overlooked something. Is there any means of checking whether a screen orientation is reverse or 'normal'? If possible without the Phone library (my users dislike this permission). This seems important as the compass is 180 degrees off in reverse mode. It also appears as if...www.b4x.com
NO! How should that work? I never saw any android app which shows two different orientations at the same timeso i can set more than one orientation?
ok so basically the logic is to check the current phone orientation and if orientation = reverse landscape than set orientation to portrait. Am i wrong?NO! How should that work? I never saw any android app which shows two different orientations at the same time
As i wrote:
You can check the active Orientation and set another one if the wrong one is set. That´s the only thing i can imagine to prevent a specific orientation.
Sub Activity_Create(FirstTime As Boolean)
Do While GetOrientation = 3
xui.MsgboxAsync("Please rotate the device", "Orientation problem")
Wait For MsgBox_Result (Result As Int)
Loop
End Sub
Private Sub GetOrientation As Int
Dim r As Reflector
r.Target = r.GetContext
r.Target = r.RunMethod2("getSystemService", "window", "java.lang.String")
r.Target = r.RunMethod("getDefaultDisplay")
Return r.RunMethod("getOrientation")
End Sub