草庐IT

MyListClass

全部标签

android - 实现包含 List 的 Parcelable 接口(interface)的对象抛出 NullPointerException

我正在尝试使用Parcelable接口(interface)创建一个包含对象的List的对象。我无法读回Parcel对象。谁能指出我正确的方向?我在这里缺少什么?MyParcelable对象:publicclassMyParcelableimplementsParcelable{privateintmyInt=0;privateListarrList;publicListgetArrList(){returnarrList;}publicvoidsetArrList(ListarrList){this.arrList=arrList;}publicintgetMyInt(){retur