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

The following are Jave code examples for showing how to use readBooleanArray() 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: journey-android-bluetooth-scale   File: ScaleReadingParcel.java   View Source Code Vote up 6 votes
private ScaleReadingParcel(Parcel source) {
    /**
     * NB: the order in which values is read must match the order in which they are written exactly:
     * `writeToParcel(Parcel dest, int flags)`
     */

    this.weight = source.readDouble();
    this.unit = ScaleReading.Unit.valueOf(source.readInt());

    boolean[] booleanValues = new boolean[4];
    source.readBooleanArray(booleanValues);
    this.fault = booleanValues[0];
    this.overweight = booleanValues[1];
    this.stable = booleanValues[2];
    this.zero = booleanValues[3];
}
 
Example 2
Project: OpenAPK   File: AppItem.java   View Source Code Vote up 6 votes
public AppItem(Parcel parcel) {
    icon = parcel.readParcelable(getClass().getClassLoader());
    packageLabel = parcel.readString();
    packageName = parcel.readString();
    versionName = parcel.readString();
    versionCode = parcel.readString();
    data = parcel.readString();
    source = parcel.readString();
    install = parcel.readString();
    update = parcel.readString();
    boolean[] flags = new boolean[4];
    parcel.readBooleanArray(flags);
    system = flags[0];
    disable = flags[1];
    hide = flags[2];
    favorite = flags[3];
}
 
Example 3
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 4
Project: Tusky   File: Account.java   View Source Code Vote up 6 votes
protected Account(Parcel in) {
    id = in.readString();
    localUsername = in.readString();
    username = in.readString();
    displayName = in.readString();
    note = HtmlUtils.fromHtml(in.readString());
    url = in.readString();
    avatar = in.readString();
    header = in.readString();
    boolean[] lockedArray = new boolean[1];
    in.readBooleanArray(lockedArray);
    locked = lockedArray[0];
    followersCount = in.readString();
    followingCount = in.readString();
    statusesCount = in.readString();
}
 
Example 5
Project: UndoEditText   File: UndoEditText.java   View Source Code Vote up 5 votes
private SavedState(Parcel in) {
    super(in);
    undoStack = in.readParcelable(EditActionStack.class.getClassLoader());
    redoStack = in.readParcelable(EditActionStack.class.getClassLoader());

    boolean[] temp = new boolean[1];
    in.readBooleanArray(temp);
    isPersonEdit = temp[0];
}
 
Example 6
Project: BlogBookApp   File: HorizontalLoopBarView.java   View Source Code Vote up 5 votes
@SuppressWarnings("unused")
private SavedState(Parcel parcel) {
    super(parcel);
    mCurrentItemPosition = parcel.readInt();
    @GravityAttr
    int gravity = parcel.readInt();
    mSelectionGravity = gravity;
    @ScrollAttr
    int scrollMode = parcel.readInt();
    mScrollMode = scrollMode;
    boolean[] booleanValues = new boolean[1];
    parcel.readBooleanArray(booleanValues);
    mIsInfinite = booleanValues[0];
    mAdapterSize = parcel.readInt();
}