Make a class parcelable which contains Custom object list

╄→尐↘猪︶ㄣ 提交于 2019-12-03 16:49:31

You have not created the object cpls before you use it
In your TestSample(Parcel in) constructor, you are using cpls without declaring it..
You should do like this

 private TestSample(Parcel in) {
        intValue = in.readInt();
        stirngValue=in.readString();
        cpls = new ArrayList<DocumentControlPolicy>();//The code you missed.. 
        in.readTypedList(cpls,DocumentControlPolicy.CREATOR);
    }
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!