Android Question Equivalent to "Rectangle" (RealBasic)

nypaulie

Active Member
Licensed User
Longtime 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

  • Screenshot-eBook Collection.png
    Screenshot-eBook Collection.png
    25.3 KB · Views: 166

nypaulie

Active Member
Licensed User
Longtime 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!
 
Upvote 0

nypaulie

Active Member
Licensed User
Longtime 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.
 
Upvote 0

LucaMs

Expert
Licensed User
Longtime 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)
 
Upvote 0

nypaulie

Active Member
Licensed User
Longtime 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

  • Screenshot_2015-01-22-08-02-15.png
    Screenshot_2015-01-22-08-02-15.png
    30.8 KB · Views: 144
Upvote 0

udg

Expert
Licensed User
Longtime 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
 
Upvote 0

nypaulie

Active Member
Licensed User
Longtime 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

  • TabScreenShot.png
    TabScreenShot.png
    148.5 KB · Views: 167
Upvote 0
Top