In order not to have the items selectable, I disable them by code ( but it is perhaps doable in the xml files ), in the adapter definition :
ListAdapter adapter = new SimpleCursorAdapter(MyList, Layout, c, new String[] { "Name", "Score" }, to) { public boolean areAllItemsEnabled() { return false; } public boolean isEnabled(int position) { return false; } }; and it's ok... Emmanuel http://androidblogger.blogspot.com/ On Feb 5, 12:08 am, BoD <bodl...@gmail.com> wrote: > I too have this problem. > I tried this solution (setting the listSelector to #00000000), but > even though it does suppress the Orange background there's a side > effect: the text is darker. > Isn't there a "proper" way to completely disable the focusable/ > selectable behavior of a ListView? If you can make it not clickable, > it should make sense that it is also not possible to select cells. > > Thanks for your help! > > BoD > > On Feb 2, 12:47 pm, Mark Murphy <mmur...@commonsware.com> wrote: > > > fahad wrote: > > > Hi, > > > > I've set the row (view) being used in a ListView as non-focusable > > > along with non-clickable and have set the listview's focusable flag to > > > false as well. However, I still get the yellow highlight when I use > > > the scroll-ball on my device. How can I disable the yellow highlight > > > and use my own special view/color instead upon focus? > > > > Any help would be much appreciated. > > > android:listSelector in your ListView XML will allow you to change the > > color/drawable used for the highlight. You can also set it to be fully > > transparent (#00000000) and "roll your own" highlighting, if you feel > > the need. > > > -- > > Mark Murphy (a Commons Guy)http://commonsware.com > > > Android Training on the Ranch! -- Mar 16-20, > > 2009http://www.bignerdranch.com/schedule.shtml --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers-unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---