Getting the default color for Clickview by default, depending on the device

In my Android app, I use listview and some linear layout that the user can click on.

Of course, I had to set the background of my LinearLayout to an xml file where the specified clicked, selected are defined:

myView.setBackgroundDrawable( getDrawable(android.R.drawable.list_selector_background)); 

So without any problems, I set transparent transparency during normal use and orange when pressed.

My only problem is that on Galaxy S and some other tuned phones (Sense UI) the color of the click on the list will be blue or green!

http://img.skitch.com/20100928-fuq6ie4uxipguxug9yyinwher.jpgalt text

So I need to choose this color to set it to the background of my linear line. I do not want to mix orange and blue, or orange and green for my user!

Where can I get this color ??? It will be really helpful!

+4
source share
1 answer

Just found the answer:

 android:background="@android:drawable/list_selector_background" 
+6
source

All Articles