转载地址:http://blog.csdn.net/zgf1991/article/details/24319979
http://stackoverflow.com/questions/6201311/how-to-read-write-a-boolean-when-implementing-the-parcelable-interface?answertab=votes#tab-top
- Here's how I'd do it...
- writeToParcel:
- dest.writeByte((byte) (myBoolean ? 1 : 0)); //if myBoolean == true, byte == 1
- readFromParcel:
- myBoolean = in.readByte() != 0; //myBoolean == true if byte != 0