I need to create a layout like below.

And I worked out how to create a this layout:

How can I add top and bottom margins? And button background color? I made the button transparent by using:
android:background="@android:color/transparent"
Now how can I make button background color to light blue.
If I use custom button layout, how can I do that? I checked lots of Stackoverflow questions, but all of them concern gradient, color change on click, etc.
Thank you!
You don’t want to use the transparent background color … instead set it to the blue color you want. Then use setAlpha to make it partially transparent:
To set both the border and transparent background, I think you’ll have to make an XML drawable and define as the button’s background:
Then the drawable resource should be like this (/res/drawable/mybuttonbackground.xml):