Android Open Source - AndroidUIExample Line Segment






From Project

Back to project page AndroidUIExample.

License

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.

Java Source Code

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];
    }
  };
}




Java Source Code List

action.Action.java
action.BackAction.java
action.CloseAction.java
action.DrawerAction.java
action.LineSegment.java
action.PlusAction.java
action.SymbolAction.java
com.example.androidui.ActionView.java
com.example.androidui.MyActivity.java
com.example.androidui.RevealColorView.java
util.BakedBezierInterpolator.java
util.UiHelper.java