Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Use default highlight colors in a custom button

I want to use a Button in my android app but I want to customize how it looks. However, I want the highlight and selected colors of the button to be the same as the default colors (i.e. the dark and light orange gradients, or whatever the theme color supplies).

Is there anyway to get the default highlight/selected drawables and to use that as the fill for my buttons on the selected and highlighted states?

Thanks!

like image 690
Wise Shepherd Avatar asked Sep 10 '10 16:09

Wise Shepherd


1 Answers

You are asking for two different things, do you want the drawables or the colorcode?

Anyway, you can find the name of the drawables here: http://androiddrawableexplorer.appspot.com/ I don't know if you can use them directly from your app or if you have to save them to your drawables folder first, but you can find them in your sdk. If you want the colorcodes, use gimp to extract them from the pictures.

like image 143
softarn Avatar answered Sep 27 '22 19:09

softarn