Does variable order matter while parcel read/write operation in Parcelable?

前端 未结 2 734
我寻月下人不归
我寻月下人不归 2021-01-12 20:00

I have the following implementation of a Parcelable class:

public class DemoModel implements Parcelable {
    private String para1;
    private          


        
2条回答
  •  不知归路
    2021-01-12 20:35

    According to this source:

    One very important thing to pay close attention to is the order that you write and read your values to and from the Parcel. They need to match up in both cases.

    It's caused by the way parcelable is implemented by its creators

提交回复
热议问题