Java Code Examples for android.os.Parcel.readParcelableArray()

The following are Jave code examples for showing how to use readParcelableArray() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: kognitivo   File: LoginClient.java   View Source Code Vote up 7 votes
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);
}
 
Example 2
Project: MVVMFrames   File: Message.java   View Source Code Vote up 6 votes
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();
}
 
Example 3
Project: LJFramework   File: MVPMessage.java   View Source Code Vote up 6 votes
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();
}
 
Example 4
Project: trust-wallet-android   File: Transaction.java   View Source Code Vote up 6 votes
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;
}
 
Example 5
Project: nifi-android-s2s   File: DataCollectorTestImpl.java   View Source Code Vote up 5 votes
@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;
}
 
Example 6
Project: cwac-crossport   File: CoordinatorLayout.java   View Source Code Vote up 5 votes
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]);
  }
}
 
Example 7
Project: boohee_v5.6   File: ParcelableSparseArray.java   View Source Code Vote up 5 votes
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]);
    }
}
 
Example 8
Project: boohee_v5.6   File: CoordinatorLayout.java   View Source Code Vote up 5 votes
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]);
    }
}