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


Java Parcel.writeMap方法代码示例

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


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

示例1: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel out, int flags) {
    out.writeInt(action);
    out.writeInt(userMode);
    out.writeInt(acceptMimes.length);
    out.writeStringArray(acceptMimes);
    out.writeInt(userSortOrder);
    out.writeInt(allowMultiple ? 1 : 0);
    out.writeInt(showSize ? 1 : 0);
    out.writeInt(showFolderSize ? 1 : 0);
    out.writeInt(showThumbnail ? 1 : 0);
    out.writeInt(showHiddenFiles ? 1 : 0);
    out.writeInt(localOnly ? 1 : 0);
    out.writeInt(forceAdvanced ? 1 : 0);
    out.writeInt(showAdvanced ? 1 : 0);
    out.writeInt(rootMode ? 1 : 0);
    out.writeInt(stackTouched ? 1 : 0);
    out.writeInt(restored ? 1 : 0);
    DurableUtils.writeToParcel(out, stack);
    out.writeString(currentSearch);
    out.writeMap(dirState);
}
 
开发者ID:kranthi0987,项目名称:easyfilemanager,代码行数:23,代码来源:BaseActivity.java

示例2: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel parcel, int i) {
    parcel.writeString(teamName);
    parcel.writeString(teamID);
    parcel.writeFloat(latitude);
    parcel.writeFloat(longitude);
    parcel.writeString(status);
    parcel.writeInt(travelTime);
    parcel.writeString(travelTimeReadable);
    parcel.writeMap(teamMembers);
    parcel.writeMap(tokens);
}
 
开发者ID:panzerama,项目名称:Dispatch,代码行数:13,代码来源:Team.java

示例3: writeMeta

import android.os.Parcel; //导入方法依赖的package包/类
public static void writeMeta(Parcel p, Bundle meta) {
    Map<String, String> map = new HashMap<>();
    if (meta != null) {
        for (String key : meta.keySet()) {
            map.put(key, meta.getString(key));
        }
    }
    p.writeMap(map);
}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:10,代码来源:ParcelHelper.java

示例4: writePersistenceData

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writePersistenceData(Parcel p) {
    final SparseArray<HashMap<String, VSConfig>> configs = mService.getConfigs();
    int N = configs.size();
    p.writeInt(N);
    while (N-- > 0) {
        int userId = configs.keyAt(N);
        Map<String, VSConfig> userMap = configs.valueAt(N);
        p.writeInt(userId);
        p.writeMap(userMap);
    }

}
 
开发者ID:7763sea,项目名称:VirtualHook,代码行数:14,代码来源:VSPersistenceLayer.java

示例5: writePersistenceData

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writePersistenceData(Parcel p) {
    mGlobalConfig.writeToParcel(p, 0);
    p.writeInt(mLocConfigs.size());
    for (int i = 0; i < mLocConfigs.size(); i++) {
        int userId = mLocConfigs.keyAt(i);
        Map<String, VLocConfig> pkgs = mLocConfigs.valueAt(i);
        p.writeInt(userId);
        p.writeMap(pkgs);
    }
}
 
开发者ID:coding-dream,项目名称:TPlayer,代码行数:12,代码来源:VirtualLocationService.java

示例6: 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

示例7: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
public void writeToParcel(Parcel out, int flags) {
    out.writeLong(mId);
    out.writeString(nonNull(mTitle));
    out.writeFloat(mRating);
    out.writeString(nonNull(mPlot));
    out.writeMap(mActors);
    out.writeStringList(mDirectors);
    out.writeString(mFile!=null?mFile.toString():"");
}
 
开发者ID:archos-sa,项目名称:aos-MediaLib,代码行数:10,代码来源:BaseTags.java

示例8: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeMap(mHeaderMap);
}
 
开发者ID:weiwenqiang,项目名称:GitHub,代码行数:5,代码来源:FileDownloadHeader.java

示例9: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public void writeToParcel(Parcel dest, int flags) {
    dest.writeMap(map);
}
 
开发者ID:Doist,项目名称:JobSchedulerCompat,代码行数:5,代码来源:PersistableBundle.java

示例10: writeToParcel

import android.os.Parcel; //导入方法依赖的package包/类
public void writeToParcel(Parcel parcel, int flags) {
    parcel.writeMap(this.mValues);
}
 
开发者ID:kkmike999,项目名称:YuiHatano,代码行数:4,代码来源:ContentValues.java


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