當前位置: 首頁>>代碼示例>>Java>>正文


Java Parcel.readBooleanArray方法代碼示例

本文整理匯總了Java中android.os.Parcel.readBooleanArray方法的典型用法代碼示例。如果您正苦於以下問題:Java Parcel.readBooleanArray方法的具體用法?Java Parcel.readBooleanArray怎麽用?Java Parcel.readBooleanArray使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.os.Parcel的用法示例。


在下文中一共展示了Parcel.readBooleanArray方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: ScaleReadingParcel

import android.os.Parcel; //導入方法依賴的package包/類
private ScaleReadingParcel(Parcel source) {
    /**
     * NB: the order in which values is read must match the order in which they are written exactly:
     * `writeToParcel(Parcel dest, int flags)`
     */

    this.weight = source.readDouble();
    this.unit = ScaleReading.Unit.valueOf(source.readInt());

    boolean[] booleanValues = new boolean[4];
    source.readBooleanArray(booleanValues);
    this.fault = booleanValues[0];
    this.overweight = booleanValues[1];
    this.stable = booleanValues[2];
    this.zero = booleanValues[3];
}
 
開發者ID:journeyapps,項目名稱:journey-android-bluetooth-scale,代碼行數:17,代碼來源:ScaleReadingParcel.java

示例2: AppItem

import android.os.Parcel; //導入方法依賴的package包/類
public AppItem(Parcel parcel) {
    icon = parcel.readParcelable(getClass().getClassLoader());
    packageLabel = parcel.readString();
    packageName = parcel.readString();
    versionName = parcel.readString();
    versionCode = parcel.readString();
    data = parcel.readString();
    source = parcel.readString();
    install = parcel.readString();
    update = parcel.readString();
    boolean[] flags = new boolean[4];
    parcel.readBooleanArray(flags);
    system = flags[0];
    disable = flags[1];
    hide = flags[2];
    favorite = flags[3];
}
 
開發者ID:dkanada,項目名稱:OpenAPK,代碼行數:18,代碼來源:AppItem.java

示例3: createFromParcel

import android.os.Parcel; //導入方法依賴的package包/類
@Override
public LongSparseArrayBooleanParcelable createFromParcel(Parcel parcel) {
    LongSparseArrayBooleanParcelable read = new LongSparseArrayBooleanParcelable();
    int size = parcel.readInt();
    long[] keys = new long[size];
    boolean[] values = new boolean[size];

    parcel.readLongArray(keys);
    parcel.readBooleanArray(values);

    for (int i=0; i<size; i++){
        read.put(keys[i], values[i]);
    }

    return read;
}
 
開發者ID:danlls,項目名稱:Todule-android,代碼行數:17,代碼來源:LongSparseArrayBooleanParcelable.java

示例4: Account

import android.os.Parcel; //導入方法依賴的package包/類
protected Account(Parcel in) {
    id = in.readString();
    localUsername = in.readString();
    username = in.readString();
    displayName = in.readString();
    note = HtmlUtils.fromHtml(in.readString());
    url = in.readString();
    avatar = in.readString();
    header = in.readString();
    boolean[] lockedArray = new boolean[1];
    in.readBooleanArray(lockedArray);
    locked = lockedArray[0];
    followersCount = in.readString();
    followingCount = in.readString();
    statusesCount = in.readString();
}
 
開發者ID:Vavassor,項目名稱:Tusky,代碼行數:17,代碼來源:Account.java

示例5: SavedState

import android.os.Parcel; //導入方法依賴的package包/類
private SavedState(Parcel in) {
    super(in);
    undoStack = in.readParcelable(EditActionStack.class.getClassLoader());
    redoStack = in.readParcelable(EditActionStack.class.getClassLoader());

    boolean[] temp = new boolean[1];
    in.readBooleanArray(temp);
    isPersonEdit = temp[0];
}
 
開發者ID:NUST-Bob,項目名稱:UndoEditText,代碼行數:10,代碼來源:UndoEditText.java

示例6: SavedState

import android.os.Parcel; //導入方法依賴的package包/類
@SuppressWarnings("unused")
private SavedState(Parcel parcel) {
    super(parcel);
    mCurrentItemPosition = parcel.readInt();
    @GravityAttr
    int gravity = parcel.readInt();
    mSelectionGravity = gravity;
    @ScrollAttr
    int scrollMode = parcel.readInt();
    mScrollMode = scrollMode;
    boolean[] booleanValues = new boolean[1];
    parcel.readBooleanArray(booleanValues);
    mIsInfinite = booleanValues[0];
    mAdapterSize = parcel.readInt();
}
 
開發者ID:sinhaDroid,項目名稱:BlogBookApp,代碼行數:16,代碼來源:HorizontalLoopBarView.java


注:本文中的android.os.Parcel.readBooleanArray方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。