开发者

Highlight child in custom ExapandableListAdapter- Android

Just a quick question. I've created a custom ExpandableListAdapt开发者_如何转开发er, both the parent and child have it's own XML layout file. But it's lost the highlight option when you select it (obviously it still selects the row). What option do I need to set to make it highlight like the standard layout would.

Thanks!


The problem may be because of complex focus relationship between parent and its child. Try to disable child to be focusable like this:

parent.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜