Created
November 7, 2012 09:03
-
-
Save korniltsev/4030294 to your computer and use it in GitHub Desktop.
Android ListViews not clickable
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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