本文整理汇总了Java中android.os.Parcel.readIntArray方法的典型用法代码示例。如果您正苦于以下问题:Java Parcel.readIntArray方法的具体用法?Java Parcel.readIntArray怎么用?Java Parcel.readIntArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类android.os.Parcel
的用法示例。
在下文中一共展示了Parcel.readIntArray方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
SavedState(Parcel in) {
mAnchorPosition = in.readInt();
mVisibleAnchorPosition = in.readInt();
mSpanOffsetsSize = in.readInt();
if (mSpanOffsetsSize > 0) {
mSpanOffsets = new int[mSpanOffsetsSize];
in.readIntArray(mSpanOffsets);
}
mSpanLookupSize = in.readInt();
if (mSpanLookupSize > 0) {
mSpanLookup = new int[mSpanLookupSize];
in.readIntArray(mSpanLookup);
}
mReverseLayout = in.readInt() == 1;
mAnchorLayoutFromEnd = in.readInt() == 1;
mLastLayoutRTL = in.readInt() == 1;
//noinspection unchecked
mFullSpanItems = in.readArrayList(
LazySpanLookup.FullSpanItem.class.getClassLoader());
}
示例2: GraphicPath
import android.os.Parcel; //导入方法依赖的package包/类
protected GraphicPath(Parcel in) {
int size=in.readInt();
int[] x=new int[size];
int[] y=new int[size];
in.readIntArray(x);
in.readIntArray(y);
pathX=new ArrayList<>();
pathY=new ArrayList<>();
for (int i=0;i<x.length;i++){
pathX.add(x[i]);
}
for (int i=0;i<y.length;i++){
pathY.add(y[i]);
}
}
示例3: createFromParcel
import android.os.Parcel; //导入方法依赖的package包/类
public MeshElementInfo createFromParcel(Parcel in) {
MeshElementInfo eltInfo = new MeshElementInfo();
int n;
byte[] tmp;
n = in.readInt();
tmp = new byte[n];
in.readByteArray(tmp);
eltInfo.mMids = byteArrayToShortArray(tmp);
n = in.readInt();
eltInfo.mVmids = new int[n];
in.readIntArray(eltInfo.mVmids);
return eltInfo;
}
示例4: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
/**
* Called from {@link #CREATOR} to create an instance of SavedState form the given parcel
* <var>source</var>.
*
* @param source Parcel with data for the new instance.
*/
protected SavedState(@NonNull Parcel source) {
super(source);
this.selection = source.readInt();
this.selectionRange = source.readInt();
source.readIntArray(numbers = new int[source.readInt()]);
this.numberFormat = (NumberFormat) source.readSerializable();
}
示例5: FullSpanItem
import android.os.Parcel; //导入方法依赖的package包/类
public FullSpanItem(Parcel in) {
mPosition = in.readInt();
mGapDir = in.readInt();
mHasUnwantedGapAfter = in.readInt() == 1;
int spanCount = in.readInt();
if (spanCount > 0) {
mGapPerSpan = new int[spanCount];
in.readIntArray(mGapPerSpan);
}
}
示例6: FullSpanItem
import android.os.Parcel; //导入方法依赖的package包/类
public FullSpanItem(Parcel in) {
boolean z = true;
this.mPosition = in.readInt();
this.mGapDir = in.readInt();
if (in.readInt() != 1) {
z = false;
}
this.mHasUnwantedGapAfter = z;
int spanCount = in.readInt();
if (spanCount > 0) {
this.mGapPerSpan = new int[spanCount];
in.readIntArray(this.mGapPerSpan);
}
}
示例7: SavedState
import android.os.Parcel; //导入方法依赖的package包/类
SavedState(Parcel in) {
boolean z;
boolean z2 = true;
this.mAnchorPosition = in.readInt();
this.mVisibleAnchorPosition = in.readInt();
this.mSpanOffsetsSize = in.readInt();
if (this.mSpanOffsetsSize > 0) {
this.mSpanOffsets = new int[this.mSpanOffsetsSize];
in.readIntArray(this.mSpanOffsets);
}
this.mSpanLookupSize = in.readInt();
if (this.mSpanLookupSize > 0) {
this.mSpanLookup = new int[this.mSpanLookupSize];
in.readIntArray(this.mSpanLookup);
}
this.mReverseLayout = in.readInt() == 1;
if (in.readInt() == 1) {
z = true;
} else {
z = false;
}
this.mAnchorLayoutFromEnd = z;
if (in.readInt() != 1) {
z2 = false;
}
this.mLastLayoutRTL = z2;
this.mFullSpanItems = in.readArrayList(FullSpanItem.class.getClassLoader());
}
示例8: State
import android.os.Parcel; //导入方法依赖的package包/类
private State(Parcel in) {
int[] ordinals = new int[2];
in.readIntArray(ordinals);
in.readLongArray(startTimes);
this.transitionStartTime = in.readLong();
int i = 0;
for (int ordinal : ordinals) {
taggingStates[i++] = FunkyView.State.values()[ordinal];
}
}
示例9: 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]);
}
}
示例10: createFromParcel
import android.os.Parcel; //导入方法依赖的package包/类
public TagFilterHolder createFromParcel(Parcel in) {
TagFilterHolder holder = new TagFilterHolder();
String[] filters = in.createStringArray();
in.readStringArray(filters);
Collections.addAll(holder.mSelectedFilters, filters);
int[] categories = in.createIntArray();
in.readIntArray(categories);
System.arraycopy(categories, 0, holder.mCategories, 0, categories.length);
holder.mShowLiveStreamedSessions = in.readInt() == 1;
return holder;
}
示例11: Game
import android.os.Parcel; //导入方法依赖的package包/类
public Game(Parcel parcel) {
String[] stringData = new String[4];
int[] intData = new int[2];
parcel.readStringArray(stringData);
parcel.readIntArray(intData);
gameTitle = stringData[0];
gameViewers = intData[0];
gameStreamers = intData[1];
gamePreviewSmallURL = stringData[1];
gamePreviewMediumURL = stringData[2];
gamePreviewLargeURL = stringData[3];
}
示例12: 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]);
}
}
示例13: 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]);
}
}
示例14: WidgetTextBean
import android.os.Parcel; //导入方法依赖的package包/类
protected WidgetTextBean(Parcel in) {
mTextSize = in.readInt();
mTypeface = in.readString();
mTextColor = new int[in.readInt()];
in.readIntArray(mTextColor);
mTextRect = in.readParcelable(Rect.class.getClassLoader());
mTextGravity = in.readInt();
mBackgroundRes = in.readInt();
mImageRes = in.readInt();
mImageX = in.readInt();
mImageY = in.readInt();
mImageGravity = in.readInt();
mDefaultWidth = in.readInt();
mDefaultHeight = in.readInt();
mText = in.readString();
mMinTextSize = in.readInt();
mTextRotateAngle = in.readInt();
mStrokeWidth = in.readFloat();
mStrokeColor = new int[in.readInt()];
in.readIntArray(mStrokeColor);
mLetterSpace = in.readFloat();
mTextStartXOffset = in.readFloat();
mTextStartYOffset = in.readFloat();
mImageWidth = in.readInt();
mImageHeight = in.readInt();
mTextColorGradient = in.readInt();
mShadowRadius = in.readFloat();
mShadowDisX = in.readFloat();
mShadowDisY = in.readFloat();
mShadowColor = in.readInt();
mLineSpace = in.readFloat();
mTextStrokeGradient = in.readInt();
}
示例15: IntArrayList
import android.os.Parcel; //导入方法依赖的package包/类
private IntArrayList(@NonNull final Parcel in) {
mSize = in.readInt();
final int length = in.readInt();
mItems = new int[length];
in.readIntArray(mItems);
}