android:listSelector="@android:color/transparent" I have used this to set color and it works.
On Fri, Apr 16, 2010 at 8:20 AM, Carmen Delessio <[email protected]>wrote: > Or in the code, use setSelector method of listview. > Something like: > myListView.setSelector(R.drawable.listdrawable) > > > http://developer.android.com/intl/zh-CN/reference/android/widget/AbsListView.html#setSelector%28int%29 > public void setSelector (int resID) > Since: API Level > 1<http://developer.android.com/guide/appendix/api-levels.html#level1> > > Set a Drawable that should be used to highlight the currently selected > item. > Related XML Attributes > > - > android:listSelector<http://developer.android.com/reference/android/widget/AbsListView.html#attr_android:listSelector> > > Parameters resID A Drawable resource to use as the selection highlight. > -- > Carmen > http://www.twitter.com/CarmenDelessio > http://www.talkingandroid.com > http://www.facebook.com/BFFPhoto > http://www.twitter.com/DroidDrop > > > On Fri, Apr 16, 2010 at 9:02 AM, social hub <[email protected]> wrote: > >> android:listSelector >> >> >> On Fri, Apr 16, 2010 at 6:23 AM, waterblood <[email protected]>wrote: >> >>> Hi All, >>> >>> I am trying to overwrite the default backgroud color of List item >>> which is holding the focus in the ListView. As you can see, in Android >>> Setting Menu, when you scroll through the ListView, the focused >>> ListItem has a red backgroud to highlight its focus. Does any way to >>> change the default behavior by highlighting it with other color or >>> just a bottom red line under this Item. >>> >>> Any comments are welcome. >>> >>> BRs >>> Guoyin Chen >>> >>> -- >>> You received this message because you are subscribed to the Google >>> Groups "Android Developers" group. >>> To post to this group, send email to [email protected] >>> To unsubscribe from this group, send email to >>> [email protected]<android-developers%[email protected]> >>> For more options, visit this group at >>> http://groups.google.com/group/android-developers?hl=en >> >> >> -- >> You received this message because you are subscribed to the Google >> Groups "Android Developers" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected]<android-developers%[email protected]> >> For more options, visit this group at >> http://groups.google.com/group/android-developers?hl=en >> > > > > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected]<android-developers%[email protected]> > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

