本文整理汇总了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;
}
示例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);
}
示例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();
}
示例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;
}
示例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]);
}
}
示例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]);
}
}
示例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]);
}
}