Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: ListView Selector set to null?

I want to disable the Selector from my ListView. That's when I click any items there will be no indication that it has been clicked.

I tried this in my ListView tag: android:listSelector="@null" and didn't work

like image 274
iTurki Avatar asked Jul 09 '11 07:07

iTurki


2 Answers

set this android:listSelector="#00000000" Try this.

like image 60
kalpana c Avatar answered Nov 01 '22 18:11

kalpana c


The above answer from Kalpana is correct. You can also do it in code like this:-

myListView.setSelector(new ColorDrawable(0x0));
like image 28
David Avatar answered Nov 01 '22 17:11

David