Android Question Panel hide/show or Panel specific layout?

udg

Expert
Licensed User
Longtime User
Hi all,

I'm very new to B4A so after reading some threads about subjects near to what I'd like to accomplish I invariantly end with a question like the one above: which is the "best" approach?

My app should start showing a welcome screen with a couple of main options; for this I use a panel as big as the whole activity space and three more panels inside the first one, each dedicated to a specific option.
Now, when the user touches on panel_A the app hides its main panel and shows pnlOptionA (not to say, itself littered with a few specific panels..). The same for option B. Using the back button or touching any element on a "secondary panel" the app response is just to hide that panel and to show its main panel again.
So far so good. It all works as expected.

My question arises when using the Designer to create/set all those panels: to be honest, it's a really mess!
I like the Designer (over coding each element) for its immediacy and its script function useful for easily adapt any layout to multiple screen sizes/res.

So, what should I do? Create a separate layout for each OptionX panel and load it in response to user events or stay with the hide/show strategy used so far?

TIA
 

klaus

Expert
Licensed User
Longtime User
When you click on option A and show pnlOptionA is this full screen ?
The 'standard' way Android works is using Activites one for each task.
Main Activity with its layout
Option A Activity with its layout(s)
Option B Activity with its layout(s)

It's easier to handle than hiding and showing Panels.
Touching the Back button goes automatically back to the previous activity.

Depending on the size of the panels you could have a specific layout for each panel.

Best regards.
 
Upvote 0

udg

Expert
Licensed User
Longtime User
Hi Klaus,
thanks for you prompt response.
Yes, each "secondary" panel covers the whole area. What differentiates one from the other is the info showed on each one and the way that info is displayed (ListView, WebView, Labels and other elements).
Mainly the app, at this stage, should read some info from a remote MySql DB and show it back to the user. It's a kind of "passive" read-only app not asking any activity on the user (just read the infos and forget..).

Due to its simplicity I tried the "one-activity-may panels" approach, but as already described the Designer ended up in pure chaos.

Umberto
 
Upvote 0

udg

Expert
Licensed User
Longtime User
I much appreciate your suggestion and I'm glad to have the opportunity to build on your past experience.
Thanks again for your support.

Umberto
 
Upvote 0
Top