Android Question Button with a margin

grafsoft

Well-Known Member
Licensed User
Longtime User
Hi,

I need a button on a photo, therefore I cannot know the color of the background.

So, I need for example a white button with a black margin of 2 dip.

What is the easiest way to accomplish this?

Thank you

Peter
 

klaus

Expert
Licensed User
Longtime User
In B4A version 4.00 you can add a boarder to a button.
With ColorDrawable you have the properties BoarderColor and BoarderWidth.
It can be defined either in the
- Designer, StateListDrawable -> ColorDrawable for the different states.
- code with ColorDrawable.Initialize2(Color As Int, CornerRadius As Int, BorderWidth As Int, BorderColor As Int).
 
Upvote 0
Top