Android Question Equivalent to "Rectangle" (RealBasic)

nypaulie

Active Member
Licensed User
Is there such an animal? I tried "overlay" but it doesn't appear over my background. I am trying to duplicate something in B4A that I had coded already in RealBasic. I had a screen layout of a certain color over which I placed three outlined rectangles in another color. These contained the buttons and labels to run the program. I know it isn't necessary, but it gives a clean organizes look. I will attach a screenshot of what I am aiming for... Thanks for feedback my friends.
 

Attachments

NJDude

Expert
Licensed User
You can do that using different ways, 2 panels (one on top of another, one slightly larger in the back) or if you have the latest version of B4A add a border.
 

nypaulie

Active Member
Licensed User
You can do that using different ways, 2 panels (one on top of another, one slightly larger in the back) or if you have the latest version of B4A add a border.
Ah... could I start with a "main" panel and then put 3 panels atop that - placing my buttons, etc. on these 3? If this is possible and outlining them is also a choice then that's a very good solution... just have to see how to get this done. Thanks!
 

nypaulie

Active Member
Licensed User
something like this
Exactly! Thanks (
something like this
Thanks for the response. You even got the colors right. I'm tingling! Is putting a border around the "main" background an option too? If so, then I've got pretty much what I need to convert my RB (Linux/Windows) program to an Android apk. Terrific. Monetary thanks will follow my friend.
 

LucaMs

Expert
Licensed User
Use the Designer to add the border:

upload_2015-1-22_3-41-29.png


Note that I loaded the layout into the Activity but you can load it also in a Panel "manually" created in the code.

Globals
Dim pnlSomeName As Panel

Activity_Create
pnlSomeName.Initialize("")
Activity.AddView(pnlSomeName...)
pnlSomeName.LoadLayout("layMain") <--- you could change the layout name, of course (SaveAs)
 

nypaulie

Active Member
Licensed User
Use the Designer to add the border:

View attachment 31408

Note that I loaded the layout into the Activity but you can load it also in a Panel "manually" created in the code.

Globals
Dim pnlSomeName As Panel

Activity_Create
pnlSomeName.Initialize("")
Activity.AddView(pnlSomeName...)
pnlSomeName.LoadLayout("layMain") <--- you could change the layout name, of course (SaveAs)
I played around with what you sent and came up with the result I've attached. Thanks again for your terrific help.
 

Attachments

udg

Expert
Licensed User
Hi nypaulie,

you may want to have a look at the CustomListView class too.
This will come handy when panels will grow past the screen dimensions, making them visible on any device.

udg
 

LucaMs

Expert
Licensed User
Hi nypaulie,

you may want to have a look at the CustomListView class too.
This will come handy when panels will grow past the screen dimensions, making them visible on any device.

udg
CustomListView and CheckList are very good and very useful.

However, sometimes you want a fixed screen and I think this is the case of @nypaulie.


Thanks for the tip, @udg.
 

nypaulie

Active Member
Licensed User
CustomListView and CheckList are very good and very useful.

However, sometimes you want a fixed screen and I think this is the case of @nypaulie.


Thanks for the tip, @udg.
Thanks for all the great advice. I have a working program now (except for "printing"). Here's a screenshot. Comments & criticism welcomed! I use Linux (Mint 17) so I need some info on printing from a db. I would be happy to be able to generate a textfile list and then print from that.
 

Attachments

Top