What is the use of flags in Parcelable?

前端 未结 2 962
孤城傲影
孤城傲影 2021-02-19 02:18

I have been writing Parcelables to Parcel without any focus on flags field, which is a parameter in the method signature and it has worked fine but I h

2条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-19 03:16

    You can only provide flag zero or one.

    You have a void method, so you're not returning a Parcelable from a function nor do you have a parameter that's Parcelable, as the documentation says, therefore the flag should be zero.

提交回复
热议问题