agraham Expert Licensed User Longtime User Jun 29, 2020 #1 I am trying to make an app adapt to split-screen mode, which is by default approximately square on my Android 10 Xaiomi Mi Max 3 but it doesn't work as I expect - perhaps I expect wrong! It only ever loads the landscape or portrait variants, even when in split screen mode. Also if you hold the device in portrait mode with this app as the top split-screen app and reduce the vertical height of the app by pushing the splitter bar up then the layout remains the portrait layout but the anchoring of the lower buttons fails and they are not shown. Maybe it's me but I don't get this at all Attachments SplitScreenTest.zip SplitScreenTest.zip 9.6 KB · Views: 465
I am trying to make an app adapt to split-screen mode, which is by default approximately square on my Android 10 Xaiomi Mi Max 3 but it doesn't work as I expect - perhaps I expect wrong! It only ever loads the landscape or portrait variants, even when in split screen mode. Also if you hold the device in portrait mode with this app as the top split-screen app and reduce the vertical height of the app by pushing the splitter bar up then the layout remains the portrait layout but the anchoring of the lower buttons fails and they are not shown. Maybe it's me but I don't get this at all
agraham Expert Licensed User Longtime User Jul 6, 2020 #21 I still don't understand I'm afraid. What is the correct way of doing this with designer scripts then? Upvote 0
I still don't understand I'm afraid. What is the correct way of doing this with designer scripts then?
Erel B4X founder Staff member Licensed User Longtime User Jul 6, 2020 #22 Code: If 100%y < 400 Then lblThatNeedsToBeHidden.Visible = False End If Upvote 0
agraham Expert Licensed User Longtime User Jul 6, 2020 #23 Erel said: If 100%y < 400 Then Click to expand... That's a bit hacky! It's the sort of code smell that I would try to avoid, embedding constants in code. That's why in post #16 above I suggested a SplitScreen keyword in designer script with a couple of other enhancements. Upvote 0
Erel said: If 100%y < 400 Then Click to expand... That's a bit hacky! It's the sort of code smell that I would try to avoid, embedding constants in code. That's why in post #16 above I suggested a SplitScreen keyword in designer script with a couple of other enhancements.
Erel B4X founder Staff member Licensed User Longtime User Jul 6, 2020 #24 I don't see it this way. It is also not related to split screen specifically. It is an implementation of the developer decision to make the layout behave differently based on the available height. Upvote 0
I don't see it this way. It is also not related to split screen specifically. It is an implementation of the developer decision to make the layout behave differently based on the available height.
agraham Expert Licensed User Longtime User Jul 6, 2020 #25 I give up. You insist that using anchors and designer script is the way to do things but are then resistant to suggestions that would make it easier to do just that! Upvote 0
I give up. You insist that using anchors and designer script is the way to do things but are then resistant to suggestions that would make it easier to do just that!
AnandGupta Expert Licensed User Longtime User Jul 15, 2020 #26 agraham said: I give up. You insist that using anchors and designer script is the way to do things but are then resistant to suggestions that would make it easier to do just that! Click to expand... I think it is because, there is a limit a 'designer' can do. We have to understand that a designer may fail in some specific conditions. Take for example, I create a button in center in a 4" screen in designer, then it will not be in center in a 6" screen. The designer do not have the option to set it with anchors. Things become more complicated if we add more buttons and labels to it. Using script we have to set some views and rest fall in line. Correct me if I am wrong. Regards, Anand Upvote 0
agraham said: I give up. You insist that using anchors and designer script is the way to do things but are then resistant to suggestions that would make it easier to do just that! Click to expand... I think it is because, there is a limit a 'designer' can do. We have to understand that a designer may fail in some specific conditions. Take for example, I create a button in center in a 4" screen in designer, then it will not be in center in a 6" screen. The designer do not have the option to set it with anchors. Things become more complicated if we add more buttons and labels to it. Using script we have to set some views and rest fall in line. Correct me if I am wrong. Regards, Anand