java.lang.IllegalArgumentException: parameter must be a descendant of this view Error

前端 未结 4 1321
暖寄归人
暖寄归人 2021-01-21 04:21

I have a strange Error with a ViewGroup. For my main View I use classes in this links ViewFlow project

    java.lang.IllegalArgumentException: parameter must be          


        
4条回答
  •  臣服心动
    2021-01-21 05:19

    Have the same problem. I use a ViewFlow as the parent view and several GridView as child views.This error happens when I press the Home key and restart the activity again after I scrolled these child views left and right.

    Here is my solution:

    mViewFlow.setDescendantFocusability(ViewGroup.FOCUS_BLOCK_DESCENDANTS);
    

    Of course, you can config it in layout.xml.

    Hope that can help you.

提交回复
热议问题