01.11.2014 Views

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

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

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

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Parcel : Rect Example<br />

import android.os.Parcel;<br />

import android.os.Parcelable;<br />

public final class Rect implements Parcelable {<br />

public int left;<br />

public int top;<br />

public int right;<br />

public int bottom;<br />

public static final Parcelable.Creator CREATOR = new Parcelable.Creator() {<br />

public Rect createFromParcel(Parcel in) { return new Rect(in); }<br />

public Rect[] newArray(int size) { return new Rect[size]; }<br />

};<br />

public Rect() { }<br />

private Rect(Parcel in) { readFromParcel(in); }<br />

public void writeToParcel(Parcel out) {<br />

out.writeInt(left);<br />

out.writeInt(top);<br />

out.writeInt(right);<br />

out.writeInt(bottom);<br />

}<br />

}<br />

public void readFromParcel(Parcel in) {<br />

left = in.readInt();<br />

top = in.readInt();<br />

right = in.readInt();<br />

bottom = in.readInt();<br />

}<br />

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

33

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

Saved successfully!

Ooh no, something went wrong!