当前位置: 首页>>代码示例>>Java>>正文


Java Parcel.writeBooleanArray方法代码示例

本文整理汇总了Java中android.os.Parcel.writeBooleanArray方法的典型用法代码示例。如果您正苦于以下问题:Java Parcel.writeBooleanArray方法的具体用法?Java Parcel.writeBooleanArray怎么用?Java Parcel.writeBooleanArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在android.os.Parcel的用法示例。


在下文中一共展示了Parcel.writeBooleanArray方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@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 });
}
 
开发者ID:journeyapps,项目名称:journey-android-bluetooth-scale,代码行数:13,代码来源:ScaleReadingParcel.java

示例2: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@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 });
}
 
开发者ID:dkanada,项目名称:OpenAPK,代码行数:14,代码来源:AppItem.java

示例3: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@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);
}
 
开发者ID:danlls,项目名称:Todule-android,代码行数:15,代码来源:LongSparseArrayBooleanParcelable.java

示例4: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@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});
}
 
开发者ID:NUST-Bob,项目名称:UndoEditText,代码行数:8,代码来源:UndoEditText.java

示例5: callMethod

import android.os.Parcel; //导入方法依赖的package包/类
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();
}
 
开发者ID:ztc1997,项目名称:anycall,代码行数:55,代码来源:Anycall.java

示例6: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@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);
}
 
开发者ID:Vavassor,项目名称:Tusky,代码行数:16,代码来源:Account.java

示例7: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeInt(mCurrentItemPosition);
    parcel.writeInt(mSelectionGravity);
    parcel.writeInt(mScrollMode);
    parcel.writeBooleanArray(new boolean[]{mIsInfinite});
    parcel.writeInt(mAdapterSize);
}
 
开发者ID:sinhaDroid,项目名称:BlogBookApp,代码行数:8,代码来源:HorizontalLoopBarView.java

示例8: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
  super.writeToParcel(dest, flags);
  dest.writeBooleanArray(selectedChildren);
}
 
开发者ID:joedayz,项目名称:pedidos-app,代码行数:6,代码来源:CheckedExpandableGroup.java


注:本文中的android.os.Parcel.writeBooleanArray方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。