Back to project page AndroidUIExample.
The source code is released under:
Apache License
If you think the Android project AndroidUIExample listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package action; /*w w w .jav a2s. c o m*/ import android.os.Parcel; import android.os.Parcelable; /** * A LineSegment describes which lines within an Action are linked together */ public class LineSegment implements Parcelable { public int[] indexes; public LineSegment(int... indexes) { this.indexes = indexes; } public int getStartIdx() { return indexes[0]; } @Override public int describeContents() { return 0; } @Override public void writeToParcel(Parcel dest, int flags) { dest.writeIntArray(this.indexes); } private LineSegment(Parcel in) { this.indexes = in.createIntArray(); } public static final Parcelable.Creator<LineSegment> CREATOR = new Parcelable.Creator<LineSegment>() { public LineSegment createFromParcel(Parcel source) { return new LineSegment(source); } public LineSegment[] newArray(int size) { return new LineSegment[size]; } }; }