--ADVERTISEMENT--

Android button is a child view which consists of text or an icon or both. TextView is also child view in android. Here, I have shown how to set border color in android buttons and textviews. I have created an android Button and TextView and have set the background color. Then, I have set border width 5dp and border color white from drawable resource and you can change that according to your needs.

Related:
Buttons - Android Button Examples
Relative Layout - Views Position in Android
How to Change Android Button on Click/Press Color
How to Add Ripple Effect/Animation to a Android Button


res/layout/border_color.xml

res/drawable/border.xml

res/values/strings.xml

Output:

Button and TextView Border Color in Android

Post a Comment

Powered by Blogger.