本文整理匯總了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]);
}
}