Android Question Is this the way to do it?

JamesGreaves

Active Member
Licensed User
In the Visual Designer, I have created a number of PANELS,
which I move in to place (...Left = 0 : ...Top = 0)
and turn on visibility as needed (...Visible = True) , to switch between screens.
I have also written a fare amount of SCRIPTS to handle the placement of all the views.
IS THIS THE WAY TO DO IT? AM I ON THE RIGHT TRACK?

upload_2019-1-17_19-42-12.png
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

klaus

Expert
Licensed User
Longtime User
I agree with DonManfred.
There are cases where using different panels in a same Activity can be useful.
But, even in this case, I would use one layout per panel, much easier to maintain. A layout is not dedicated to an Activity nor a Panel.
You can load layouts wherever you want.
And have a base panel in the layout and add all the views onto this panel. This works well with the anchors.
Use the DesignerScript as the last resource for 'fine tuning'.
I have an application for phone and tablet. On the phone I show one panel at the same in portrait but on the tablet I show two panels side by side in landscape.
 
Upvote 0

JamesGreaves

Active Member
Licensed User
I agree with DonManfred.
There are cases where using different panels in a same Activity can be useful.
But, even in this case, I would use one layout per panel, much easier to maintain. A layout is not dedicated to an Activity nor a Panel.
You can load layouts wherever you want.
And have a base panel in the layout and add all the views onto this panel. This works well with the anchors.
Use the DesignerScript as the last resource for 'fine tuning'.
I have an application for phone and tablet. On the phone I show one panel at the same in portrait but on the tablet I show two panels side by side in landscape.
Thank you Klaus, I appreciate the time you took to reply.
I sometimes have many questions at once and while I know I can find the answers to about all my questions in the forums, I sometimes just wish I could sit down and talk to someone, like you, in person or perhaps just watch you build an app from the ground up (while you comment along the way).
I grew up in the basic language from the DOS days in the 80's (Basica, GWBasic, etc... all the way through).
B4A is such an amazing tool for me, there is nothing like it. It is so dynamic, alive and active, I am so excited about it!!!
I cannot comprehend how Erel (and presume he has a team) orchestrated everything that this thing has become.
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
I grew up in the basic language from the DOS days in the 80's (Basica, GWBasic, etc... all the way through).
This reminds me quite some 'old' days.
I began also with GWBasic and then QuickBasic, GFABasic, VB1 to VB6, Basic4PPC and B4A to B4X.
 
Upvote 0

JamesGreaves

Active Member
Licensed User
This reminds me quite some 'old' days.
I began also with GWBasic and then QuickBasic, GFABasic, VB1 to VB6, Basic4PPC and B4A to B4X.
That's so cool. I started on a Commodore VIC-20, then Atari 600 XL.
There was even a TSRBasic (Terminal Stay Resident). I remember writing a bit of code to emulate the dreaded Ping-Pong virus (which was a * bouncing around the screen). Haha!
 
Upvote 0
Top