I am currently implementing a ListView populated with CheckedTextViews and have everything working just the way I want. Except for one thing: My ListView remains focusable and so the items in it get a hideous orange border around them when focused. It also changes the item text color which is annoying. I have tried using the SetItemsFocusable method but to no avail. I also overrode the isEnabled method of my adapter class, but this left me unable to check and uncheck the list item selections. I want to retain the functionality of the CheckedTextViews, just disable their focusability. I have also tried making the CheckedTextViews themselves unfocusable in their xml file, but this has not worked either. Is there some way to just disable the focus for the entire ListView and all of its children without forfeiting the checkability of its children? I do not want the ListView to gain focus either by touch or by scrolling on the keypad. Thanks so much!
I am currently implementing a ListView populated with CheckedTextViews and have everything working just
Share
You can set a transparent focused
Drawableon the individual views in your list with aStateListDrawable. Try using@android:color/transparent(it’s aDrawable, apparently).This helped me: http://blog.stylingandroid.com/archives/55