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