本文整理汇总了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();
}