01.11.2014 Views

The AndroidManifest.xml File - 안드로이드 기술 커뮤니티 : Korea ...

The AndroidManifest.xml File - 안드로이드 기술 커뮤니티 : Korea ...

The AndroidManifest.xml File - 안드로이드 기술 커뮤니티 : Korea ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Parcel : Parcelables<br />

<strong>The</strong> Parcelable protocol provides an extremely efficient (but low-level) protocol for objects to<br />

write and read themselves from Parcels. You can use the direct methods<br />

writeParcelable(Parcelable, int) and readParcelable(ClassLoader) or writeParcelableArray(T[],<br />

int) and readParcelableArray(ClassLoader) to write or read. <strong>The</strong>se methods write both the class<br />

type and its data to the Parcel, allowing that class to be reconstructed from the appropriate<br />

class loader when later reading.<br />

<strong>The</strong>re are also some methods that provide a more efficient way to work with Parcelables:<br />

writeTypedArray(T[], int), writeTypedList(List), readTypedArray(T[], Parcelable.Creator) and<br />

readTypedList(List, Parcelable.Creator). <strong>The</strong>se methods do not write the class information of<br />

the original object: instead, the caller of the read function must know what type to expect and<br />

pass in the appropriate Parcelable.Creator instead to properly construct the new object and<br />

read its data. (To more efficient write and read a single Parceable object, you can directly call<br />

Parcelable.writeToParcel and Parcelable.Creator.createFromParcel yourself.)<br />

<strong>Korea</strong> Android Community- www.kandroid.org<br />

25

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!