Android Question Looking for some advice on Panel(s) vs Activity

Gary Milne

Active Member
Licensed User
Longtime User
Hello, I'm new to B4A and this is my first question. I've read through the documentation, a good portion of the book and have a decent level of experience in VB but need some strategic perspective. I have an app I wrote in AppInventor (see attached screenshot) that I'm going to re-write in B4A for a variety of reasons.

In the current version of the app there are three distinct zones, statistics on the left, court in the middle and menu buttons on the right. My original thought was to duplicate this layout with the use of 3 panels OR I could simply use the Activity screen for the whole thing and use ClipPath for the central court area which is where all the drawing takes place. Perhaps a combination of the two makes the most sense.

My instincts tells me to use three panels but I'd be very interested to hear the perspective and rationale of a seasoned programmer.

A second question is whether anyone is aware of a control that makes button management simple, sizing, spacing, hiding\showing etc. The app will be landscape only so it needs to be able to be on the right edge for thumb access.

Thanks in advance for any feedback.

Gary M.


Screenshot_2014-07-02-07-44-20.png
Screenshot_2014-07-02-07-44-20.png
 

klaus

Expert
Licensed User
Longtime User
1) It depends on what you want to do.
For the screen from the screenshot I would use three panels.
Then it depends on what you want to display with:
Statistics
Service
More
If the whole screens are different I would use Activites.
If only the central part changes I would update the central panel.

2) Sorry, but I don't really understand what exactly you are expecting.
Is the application supposed to run on small and big screens ?
Sizing and spacing in the DesignerScripts.
Showing / hiding, you need to do it on your own in the code.
You could set one event name for the buttons and manage them in one event using the Sender property to know what button raised the event, this could be interesting if you have same code parts for the different button events.
 
Upvote 0

Gary Milne

Active Member
Licensed User
Longtime User
Hey Klaus, thanks for the input. I will go with a three panel solution.
 
Upvote 0
Top