Java Code Examples for android.os.Parcel.readLongArray()

The following are Jave code examples for showing how to use readLongArray() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: Todule-android   File: LongSparseArrayBooleanParcelable.java   View Source Code Vote up 6 votes
@Override
public LongSparseArrayBooleanParcelable createFromParcel(Parcel parcel) {
    LongSparseArrayBooleanParcelable read = new LongSparseArrayBooleanParcelable();
    int size = parcel.readInt();
    long[] keys = new long[size];
    boolean[] values = new boolean[size];

    parcel.readLongArray(keys);
    parcel.readBooleanArray(values);

    for (int i=0; i<size; i++){
        read.put(keys[i], values[i]);
    }

    return read;
}
 
Example 2
Project: choreographer-example   File: TransitioningChoreographer.java   View Source Code Vote up 5 votes
private State(Parcel in) {
    int[] ordinals = new int[2];
    in.readIntArray(ordinals);
    in.readLongArray(startTimes);
    this.transitionStartTime = in.readLong();

    int i = 0;
    for (int ordinal : ordinals) {
        taggingStates[i++] = FunkyView.State.values()[ordinal];
    }
}
 
Example 3
Project: primitive-collections-android   File: LongArrayList.java   View Source Code Vote up 4 votes
private LongArrayList(@NonNull final Parcel in) {
    mSize = in.readInt();
    final int length = in.readInt();
    mItems = new long[length];
    in.readLongArray(mItems);
}