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

The following are Jave code examples for showing how to use writeBooleanArray() 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 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    /**
     * NB: the order in which values are written must match the order in which they are read exactly:
     * `ScaleReadingParcel(Parcel source)`
     */

    dest.writeDouble(this.weight);
    dest.writeInt(this.unit.getValue());

    dest.writeBooleanArray(new boolean[] { this.fault, this.overweight, this.stable, this.zero });
}
 
Example 2
Project: OpenAPK   File: AppItem.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeParcelable(icon, flags);
    parcel.writeString(packageLabel);
    parcel.writeString(packageName);
    parcel.writeString(versionName);
    parcel.writeString(versionCode);
    parcel.writeString(data);
    parcel.writeString(source);
    parcel.writeString(install);
    parcel.writeString(update);
    parcel.writeBooleanArray(new boolean[]{ system, disable, hide, favorite });
}
 
Example 3
Project: Todule-android   File: LongSparseArrayBooleanParcelable.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel parcel, int i) {
    long[] keys = new long[size()];
    boolean[] values = new boolean[size()];

    for (int k = 0; k < size(); k++){
        keys[k] = keyAt(k);
        values[k] = valueAt(k);
    }

    parcel.writeInt(size());
    parcel.writeLongArray(keys);
    parcel.writeBooleanArray(values);
}
 
Example 4
Project: UndoEditText   File: UndoEditText.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel out, int flags) {
    super.writeToParcel(out, flags);
    out.writeParcelable(undoStack, flags);
    out.writeParcelable(redoStack, flags);
    out.writeBooleanArray(new boolean[]{isPersonEdit});
}
 
Example 5
Project: anycall   File: Anycall.java   View Source Code Vote up 5 votes
public void callMethod(final String className, final String serviceName,
                       final String methodName, final Object... paramsAndListener) {
    Parcel data = Parcel.obtain();
    data.writeInterfaceToken(className);
    for (int i = 0; i < paramsAndListener.length - 1; i++) {
        Object p = paramsAndListener[i];
        if (p instanceof Byte)
            data.writeByte((Byte) p);
        else if (p instanceof Integer)
            data.writeInt((Integer) p);
        else if (p instanceof Long)
            data.writeLong((Long) p);
        else if (p instanceof String)
            data.writeString((String) p);
        else if (p instanceof Bundle)
            data.writeBundle((Bundle) p);
        else if (p instanceof Float)
            data.writeFloat((Float) p);
        else if (p instanceof FileDescriptor)
            data.writeFileDescriptor((FileDescriptor) p);
        else if (p instanceof List)
            data.writeList((List) p);
        else if (p instanceof Exception)
            data.writeException((Exception) p);
        else if (p instanceof IBinder)
            data.writeStrongBinder((IBinder) p);
        else if (p instanceof Double)
            data.writeDouble((Double) p);
        else if (p instanceof Map)
            data.writeMap((Map) p);
        else if (p instanceof boolean[])
            data.writeBooleanArray((boolean[]) p);
        else if (p instanceof byte[])
            data.writeByteArray((byte[]) p);
        else if (p instanceof char[])
            data.writeCharArray((char[]) p);
        else if (p instanceof int[])
            data.writeIntArray((int[]) p);
        else if (p instanceof IBinder[])
            data.writeBinderArray((IBinder[]) p);
        else if (p instanceof double[])
            data.writeDoubleArray((double[]) p);
        else if (p instanceof Object[])
            data.writeArray((Object[]) p);
        else data.writeValue(p);
    }

    Object lastParam = paramsAndListener[paramsAndListener.length - 1];
    CallMethodResultListener listener = lastParam == null ? null :
            (CallMethodResultListener) lastParam;

    callMethod(className, serviceName, methodName, data, listener);
    data.recycle();
}
 
Example 6
Project: Tusky   File: Account.java   View Source Code Vote up 5 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeString(id);
    dest.writeString(localUsername);
    dest.writeString(username);
    dest.writeString(displayName);
    dest.writeString(HtmlUtils.toHtml(note));
    dest.writeString(url);
    dest.writeString(avatar);
    dest.writeString(header);
    dest.writeBooleanArray(new boolean[] { locked });
    dest.writeString(followersCount);
    dest.writeString(followingCount);
    dest.writeString(statusesCount);
}
 
Example 7
Project: BlogBookApp   File: HorizontalLoopBarView.java   View Source Code Vote up 5 votes
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeInt(mCurrentItemPosition);
    parcel.writeInt(mSelectionGravity);
    parcel.writeInt(mScrollMode);
    parcel.writeBooleanArray(new boolean[]{mIsInfinite});
    parcel.writeInt(mAdapterSize);
}
 
Example 8
Project: pedidos-app   File: CheckedExpandableGroup.java   View Source Code Vote up 4 votes
@Override
public void writeToParcel(Parcel dest, int flags) {
  super.writeToParcel(dest, flags);
  dest.writeBooleanArray(selectedChildren);
}