Skip to content

Instantly share code, notes, and snippets.

@korniltsev
Created November 7, 2012 09:03
Show Gist options
  • Save korniltsev/4030294 to your computer and use it in GitHub Desktop.
Save korniltsev/4030294 to your computer and use it in GitHub Desktop.
Android ListViews not clickable
http://netpenthe.wordpress.com/2011/11/20/android-listviews-not-clickable/
Apparently ListViews lose their clickability if they contain focusable child elements in their layout.
I initially set all the child elements to not be focusable.
But now do this in the getView() method instead:
((ViewGroup) convertedView).setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment