Android Question Lock screen orientation.

anallie0

Active Member
Licensed User
Longtime User
hi
my app uses position portrait fixed.

B4X:
#SupportedOrientations: portrait

at the touch of a button I see a youtube video.
is possible to lock the screen in landscape position and when I get out of youtube re-lock the screen in portrait position?
I tried with SetScreenOrientation but does not work.
 

anallie0

Active Member
Licensed User
Longtime User
the SetOrentiation doesn't lock the screen. If i rotate the phone , the view of video rotate.
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
Look at the attached sample, no need to use the Phone library, check the Manifest using the manifest editor.

The attached sample have 1 activity in portrait and another in landscape
 

Attachments

  • Sample.zip
    12 KB · Views: 394
Last edited:
Upvote 0

anallie0

Active Member
Licensed User
Longtime User
maybe it does not work because when I call the youtube link , my activity switches in pause and the controls are managed by youtube.
 
Upvote 0
Top