G Greenletuce Member Mar 29, 2020 #1 Hi everyone, I'm here for an other newbie question, I made a layout in the designer and I have a blank space when I try it on my phone, even though I set the views in the script so that they fit to the the entire screen. I need a menu to have a vertical scrolling so I loaded the layout with this method : B4X: Copy Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("scroll") scrollview1.Panel.LoadLayout("test") scrollview1.Panel.Height = pan1.Height scrollview1.Panel.Width = pan1.Width End Sub Here's the layout in the designer : and here's the result on my phone : I thought I was doing everything fine until I saw this blank space. However, it appears to be only when the phone is rotated on portrait mode. Is there a way I can fix this ?
Hi everyone, I'm here for an other newbie question, I made a layout in the designer and I have a blank space when I try it on my phone, even though I set the views in the script so that they fit to the the entire screen. I need a menu to have a vertical scrolling so I loaded the layout with this method : B4X: Copy Sub Activity_Create(FirstTime As Boolean) Activity.LoadLayout("scroll") scrollview1.Panel.LoadLayout("test") scrollview1.Panel.Height = pan1.Height scrollview1.Panel.Width = pan1.Width End Sub Here's the layout in the designer : and here's the result on my phone : I thought I was doing everything fine until I saw this blank space. However, it appears to be only when the phone is rotated on portrait mode. Is there a way I can fix this ?
Erel B4X founder Staff member Licensed User Longtime User Mar 30, 2020 #2 First step is to delete the script and use anchors. Second step is to increase the inner panel height. Upvote 0
First step is to delete the script and use anchors. Second step is to increase the inner panel height.
G Greenletuce Member Mar 30, 2020 #3 Thanks for your reply @Erel I just need to ask : what if I have a more complex layout with more views, should I delete the script too (I know it is not a very precise question) ? And will increasing the panel height cause problems on devices with other sreen sizes ? Thanks again for taking the time to reply Upvote 0
Thanks for your reply @Erel I just need to ask : what if I have a more complex layout with more views, should I delete the script too (I know it is not a very precise question) ? And will increasing the panel height cause problems on devices with other sreen sizes ? Thanks again for taking the time to reply
Erel B4X founder Staff member Licensed User Longtime User Mar 30, 2020 #4 Do whatever you can with anchors and whenever you need to do something that is not possible with anchors then use the designer script. Upvote 0
Do whatever you can with anchors and whenever you need to do something that is not possible with anchors then use the designer script.
G Greenletuce Member Mar 30, 2020 #5 Got it, many thanks Erel for the support and the advice Upvote 0