anallie0 Active Member Licensed User Longtime User Sep 3, 2013 #1 hi my app uses position portrait fixed. Code: Copy #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.
hi my app uses position portrait fixed. Code: Copy #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.
margret Well-Known Member Licensed User Longtime User Sep 3, 2013 #2 Have your main Activity set for Portrait only mode. Now create a new(second) Activity in your app that shows in landscape mode only, for showing the YouTube video. Each Activity will then be locked and in the proper orientation. Upvote 0
Have your main Activity set for Portrait only mode. Now create a new(second) Activity in your app that shows in landscape mode only, for showing the YouTube video. Each Activity will then be locked and in the proper orientation.
anallie0 Active Member Licensed User Longtime User Sep 3, 2013 #3 but the #SupportedOrientations doesn't support in second activity Upvote 0
klaus Expert Licensed User Longtime User Sep 3, 2013 #4 With the Phone library you can change the orientation with SetOrientation. Best regards. Upvote 0
anallie0 Active Member Licensed User Longtime User Sep 3, 2013 #5 the SetOrentiation doesn't lock the screen. If i rotate the phone , the view of video rotate. Upvote 0
klaus Expert Licensed User Longtime User Sep 3, 2013 #6 How do you call the video, is it another application ? I tested on both my devices, not with a video, when setting a given orientation rotating the device doesn't change the orientation. Best regards. Upvote 0
How do you call the video, is it another application ? I tested on both my devices, not with a video, when setting a given orientation rotating the device doesn't change the orientation. Best regards.
NJDude Expert Licensed User Longtime User Sep 3, 2013 #7 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 Sample.zip 12 KB · Views: 513 Last edited: Sep 3, 2013 Upvote 0
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
warwound Expert Licensed User Longtime User Sep 4, 2013 #8 Another possible solution here: http://www.b4x.com/android/forum/threads/how-to-set-settings-programatically.29049/#post-169635. Martin. Upvote 0
Another possible solution here: http://www.b4x.com/android/forum/threads/how-to-set-settings-programatically.29049/#post-169635. Martin.
anallie0 Active Member Licensed User Longtime User Sep 5, 2013 #9 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
maybe it does not work because when I call the youtube link , my activity switches in pause and the controls are managed by youtube.