Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android how to set button to have transparent background but outline still there

Tags:

android

button

When I set android:background="@android:color/transparent, it sets my buttons background to transparent, but the outline of the button disappears. How do I set it so that the background is transparent but there is still an outline?

like image 313
Hank Avatar asked Oct 08 '22 22:10

Hank


1 Answers

You can use a custom selector that uses different nine patch image for different states of the button.

This link might be helpful

You might use this image...

enter image description here

I hope it helps..

like image 195
R.daneel.olivaw Avatar answered Oct 12 '22 12:10

R.daneel.olivaw