當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。