Preventing/catching “IllegalArgumentException: parameter must be a descendant of this view” error

后端 未结 15 1609
北恋
北恋 2020-11-27 13:46

I have a ListView with some focusable components inside (mostly EditTexts). Yeah, I know this isn\'t exactly recommended, but in general, almost everything is w

15条回答
  •  感动是毒
    2020-11-27 14:19

    In case of Expandable List View, if your child items have edit text then you need to change the focusability before descendants for Expandable List View

    expandableListView.setDescendantFocusability(ViewGroup.FOCUS_BEFORE_DESCENDANTS);
    

提交回复
热议问题