C cwt Active Member Licensed User Longtime User Dec 11, 2020 #1 Looked all over but could not find how to do this - how do I lock the device orientation for a single page to either landscape or portrait in B4i?
Looked all over but could not find how to do this - how do I lock the device orientation for a single page to either landscape or portrait in B4i?
A Alex_197 Well-Known Member Licensed User Longtime User Dec 12, 2020 #2 In Visual designer under go to Windows->Variants and set new Variant by clicking on New Variant and select from the pop up menu Please read this https://www.b4x.com/guides/B4XVisualDesigner/?page=15 Upvote 0
In Visual designer under go to Windows->Variants and set new Variant by clicking on New Variant and select from the pop up menu Please read this https://www.b4x.com/guides/B4XVisualDesigner/?page=15
C cwt Active Member Licensed User Longtime User Dec 12, 2020 #3 I may be missing something here but I know how to use the Visual Designer - I have been using B4A for years and I know how to lock a window in Android to either landscape or potrait. But I cannot see how or where to do that in iOS. What am I missing? Upvote 0
I may be missing something here but I know how to use the Visual Designer - I have been using B4A for years and I know how to lock a window in Android to either landscape or potrait. But I cannot see how or where to do that in iOS. What am I missing?
aeric Expert Licensed User Longtime User Dec 12, 2020 #4 I think the setting will apply to all pages. Code: Copy #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown #Target: iPhone, iPad https://www.b4x.com/guides/B4XGettingStarted/?page=70 Upvote 0
I think the setting will apply to all pages. Code: Copy #iPhoneOrientations: Portrait, LandscapeLeft, LandscapeRight #iPadOrientations: Portrait, LandscapeLeft, LandscapeRight, PortraitUpsideDown #Target: iPhone, iPad https://www.b4x.com/guides/B4XGettingStarted/?page=70
f0raster0 Well-Known Member Licensed User Longtime User Dec 12, 2020 #5 are you speaking about #iPhoneOrientations: Portrait #iPadOrientations: Portrait ?? Upvote 0
C cwt Active Member Licensed User Longtime User Dec 12, 2020 #6 Yes, I am referring to #iPhoneOrientations: Portrait #iPadOrientations: Portrait But on a page-to-page basis, not globally. Is this possible? Upvote 0
Yes, I am referring to #iPhoneOrientations: Portrait #iPadOrientations: Portrait But on a page-to-page basis, not globally. Is this possible?
Semen Matusovskiy Well-Known Member Licensed User Dec 12, 2020 #7 Interface orientations for separate pages Usage. 1) Add pageOrientation module to your project. 2) After each ShowPage call setInterfaceOrientations function. For example, pageOrientations.setInterfaceOrientations (Page2, "LandscapeLeft, LandscapeRight") 3) If you want to ignore invalid orientation (let's say, in Page_Resize event)... www.b4x.com Upvote 0
Interface orientations for separate pages Usage. 1) Add pageOrientation module to your project. 2) After each ShowPage call setInterfaceOrientations function. For example, pageOrientations.setInterfaceOrientations (Page2, "LandscapeLeft, LandscapeRight") 3) If you want to ignore invalid orientation (let's say, in Page_Resize event)... www.b4x.com
C cwt Active Member Licensed User Longtime User Dec 13, 2020 #8 Semen, I am using B4XPages and your code does not appear to work with this. Do you have a version for B4XPages in B4i ? Upvote 0
Semen, I am using B4XPages and your code does not appear to work with this. Do you have a version for B4XPages in B4i ?
Semen Matusovskiy Well-Known Member Licensed User Dec 14, 2020 #9 pageOrientation.bas, as it is, works with B4XPage, because finally all is based on UIViewController. To find native Page is simple (B4XPages.GetNativeParent (Me)). But there is a small problem in which event to insert a call of pageOrientations.setInterfaceOrientations. A correct place is to insert inside B4XPages.ShowPage, but to do this is necessary to reconstruct a library (not a good idea). Upvote 0
pageOrientation.bas, as it is, works with B4XPage, because finally all is based on UIViewController. To find native Page is simple (B4XPages.GetNativeParent (Me)). But there is a small problem in which event to insert a call of pageOrientations.setInterfaceOrientations. A correct place is to insert inside B4XPages.ShowPage, but to do this is necessary to reconstruct a library (not a good idea).