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


Java Parcel.readParcelableArray方法代码示例

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


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

示例1: Transaction

import android.os.Parcel; //导入方法依赖的package包/类
protected Transaction(Parcel in) {
       hash = in.readString();
       error = in.readString();
       blockNumber = in.readString();
       timeStamp = in.readLong();
	nonce = in.readInt();
	from = in.readString();
	to = in.readString();
	value = in.readString();
	gas = in.readString();
	gasPrice = in.readString();
	input = in.readString();
	gasUsed = in.readString();
       Parcelable[] parcelableArray = in.readParcelableArray(TransactionOperation.class.getClassLoader());
       TransactionOperation[] operations = null;
       if (parcelableArray != null) {
           operations = Arrays.copyOf(parcelableArray, parcelableArray.length, TransactionOperation[].class);
       }
	this.operations = operations;
}
 
开发者ID:TrustWallet,项目名称:trust-wallet-android,代码行数:21,代码来源:Transaction.java

示例2: LoginClient

import android.os.Parcel; //导入方法依赖的package包/类
public LoginClient(Parcel source) {
    Object [] o = source.readParcelableArray(LoginMethodHandler.class.getClassLoader());
    handlersToTry = new LoginMethodHandler[o.length];
    for (int i = 0; i < o.length; ++i) {
        handlersToTry[i] = (LoginMethodHandler) o[i];
        handlersToTry[i].setLoginClient(this);
    }
    currentHandler = source.readInt();
    pendingRequest = source.readParcelable(Request.class.getClassLoader());
    loggingExtras = Utility.readStringMapFromParcel(source);
}
 
开发者ID:eviltnan,项目名称:kognitivo,代码行数:12,代码来源:LoginClient.java

示例3: readFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
private void readFromParcel(Parcel source) {
    what = source.readInt();
    arg1 = source.readInt();
    arg2 = source.readInt();
    str = source.readString();
    presenter = source.readString();
    if (source.readInt() != 0) {
        obj = source.readParcelable(getClass().getClassLoader());
    }
    if (source.readInt() != 0) {
        objs = source.readParcelableArray(getClass().getClassLoader());
    }
    data = source.readBundle();
    replyTo = Messenger.readMessengerOrNullFromParcel(source);
    sendingUid = source.readInt();
}
 
开发者ID:RockyQu,项目名称:MVVMFrames,代码行数:17,代码来源:Message.java

示例4: createFromParcel

import android.os.Parcel; //导入方法依赖的package包/类
@Override
public DataCollectorTestImpl createFromParcel(Parcel source) {
    DataCollectorTestImpl dataCollectorTest = new DataCollectorTestImpl();
    int numLists = source.readInt();
    for (int i = 0; i < numLists; i++) {
        Parcelable[] parcelables = source.readParcelableArray(DataCollectorTestImpl.class.getClassLoader());
        List<DataPacket> dataPackets = new ArrayList<>(parcelables.length);
        for (Parcelable parcelable : parcelables) {
            dataPackets.add((DataPacket)parcelable);
        }
        dataCollectorTest.dataPacketListQueue.offer(dataPackets);
    }
    return dataCollectorTest;
}
 
开发者ID:hortonworks,项目名称:nifi-android-s2s,代码行数:15,代码来源:DataCollectorTestImpl.java

示例5: SavedState

import android.os.Parcel; //导入方法依赖的package包/类
public SavedState(Parcel source, ClassLoader loader) {
  super(source, loader);

  final int size = source.readInt();

  final int[] ids = new int[size];
  source.readIntArray(ids);

  final Parcelable[] states = source.readParcelableArray(loader);

  behaviorStates = new SparseArray<>(size);
  for (int i = 0; i < size; i++) {
    behaviorStates.append(ids[i], states[i]);
  }
}
 
开发者ID:commonsguy,项目名称:cwac-crossport,代码行数:16,代码来源:CoordinatorLayout.java

示例6: ParcelableSparseArray

import android.os.Parcel; //导入方法依赖的package包/类
public ParcelableSparseArray(Parcel source, ClassLoader loader) {
    int size = source.readInt();
    int[] keys = new int[size];
    source.readIntArray(keys);
    Parcelable[] values = source.readParcelableArray(loader);
    for (int i = 0; i < size; i++) {
        put(keys[i], values[i]);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:10,代码来源:ParcelableSparseArray.java

示例7: SavedState

import android.os.Parcel; //导入方法依赖的package包/类
public SavedState(Parcel source, ClassLoader loader) {
    super(source);
    int size = source.readInt();
    int[] ids = new int[size];
    source.readIntArray(ids);
    Parcelable[] states = source.readParcelableArray(loader);
    this.behaviorStates = new SparseArray(size);
    for (int i = 0; i < size; i++) {
        this.behaviorStates.append(ids[i], states[i]);
    }
}
 
开发者ID:JackChan1999,项目名称:boohee_v5.6,代码行数:12,代码来源:CoordinatorLayout.java


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