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

前端 未结 4 1351
暖寄归人
暖寄归人 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:02

    Solved my problem with adding scroll listener.

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
    
        View currentFocus = ((Activity)mContext).getCurrentFocus();
        if (currentFocus != null) {
            currentFocus.clearFocus();
        }  
    }
    

提交回复
热议问题