下面列出了android.os.Parcel#readArrayList ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
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;
@SuppressWarnings("unchecked")
List<LazySpanLookup.FullSpanItem> fullSpanItems =
in.readArrayList(LazySpanLookup.FullSpanItem.class.getClassLoader());
mFullSpanItems = fullSpanItems;
}
protected MultiReddit(Parcel in) {
path = in.readString();
displayName = in.readString();
name = in.readString();
description = in.readString();
copiedFrom = in.readString();
iconUrl = in.readString();
visibility = in.readString();
owner = in.readString();
nSubscribers = in.readInt();
createdUTC = in.readLong();
over18 = in.readByte() != 0;
isSubscriber = in.readByte() != 0;
isFavorite = in.readByte() != 0;
subreddits = in.readArrayList(MultiReddit.class.getClassLoader());
}
private TransactionInfo(Parcel in) {
direction = Direction.fromInteger(in.readInt());
isPending = in.readByte() != 0;
isFailed = in.readByte() != 0;
amount = in.readLong();
fee = in.readLong();
blockheight = in.readLong();
hash = in.readString();
timestamp = in.readLong();
paymentId = in.readString();
account = in.readInt();
subaddress = in.readInt();
confirmations = in.readLong();
subaddressLabel = in.readString();
transfers = in.readArrayList(Transfer.class.getClassLoader());
txKey = in.readString();
notes = in.readString();
address = in.readString();
}
/**
* Parcel生成
* @param in
*/
private OperationNode(Parcel in) {
className = in.readString();
packageName = in.readString();
text = in.readString();
resourceId = in.readString();
description = in.readString();
xpath = in.readString();
id = in.readString();
depth = in.readInt();
nodeBound = in.readParcelable(Rect.class.getClassLoader());
assistantNodes = in.readArrayList(AssistantNode.class.getClassLoader());
extra = in.readHashMap(String.class.getClassLoader());
nodeType = in.readString();
}
protected CursorPager(Parcel in) {
this.href = in.readString();
this.items = in.readArrayList(ArrayList.class.getClassLoader());
this.limit = in.readInt();
this.next = in.readString();
this.cursors = in.readParcelable(Cursor.class.getClassLoader());
this.total = in.readInt();
}
private Road(Parcel in) {
mStatus = in.readInt();
mLength = in.readDouble();
mDuration = in.readDouble();
mNodes = in.readArrayList(RoadNode.class.getClassLoader());
mLegs = in.readArrayList(RoadLeg.class.getClassLoader());
mRouteHigh = in.readArrayList(GeoPoint.class.getClassLoader());
mBoundingBox = in.readParcelable(BoundingBox.class.getClassLoader());
}
@SuppressWarnings("unchecked")
protected ChannelData(Parcel in) {
this.mSiteType = in.readInt();
this.mQualityType = in.readInt();
this.mAuthKey = in.readString();
this.mId = in.readString();
this.mCategoryId = in.readInt();
this.mTitle = in.readString();
this.mProgramName = in.readString();
this.mStillImageUrl = in.readString();
this.mAudioChannel = (in.readByte() != 0);
this.mFavorite = in.readInt();
this.mItemIndex = in.readInt();
this.mEPG = in.readArrayList(EPGData.class.getClassLoader());
}
private SavedState(Parcel in) {
super(in);
try {
mDrawShapes = in.readArrayList(DrawShape.class.getClassLoader());
mLastDimensionW = in.readInt();
mLastDimensionH = in.readInt();
} catch (Exception e) {
e.printStackTrace();
}
}
private Contact(Parcel in) {
id = in.readLong();
lookupKey = in.readString();
rawId = in.readLong();
dataAnniversaryId = in.readLong();
name = in.readString();
imageThumbnailUri = in.readParcelable(Uri.class.getClassLoader());
imageUri = in.readParcelable(Uri.class.getClassLoader());
setBirthday((DateUnknownYear) in.readParcelable(DateUnknownYear.class.getClassLoader()));
phoneNumbers = in.readArrayList(PhoneNumber.class.getClassLoader());
}
@Override
public FileTraversal createFromParcel(Parcel source) {
FileTraversal ft = new FileTraversal();
ft.filename = source.readString();
ft.filecontent = source.readArrayList(FileTraversal.class.getClassLoader());
return ft;
}
private SavedState(Parcel in) {
super(in);
mHour = in.readInt();
mMinute = in.readInt();
mIs24HourMode = (in.readInt() == 1);
mInKbMode = (in.readInt() == 1);
mTypedTimes = in.readArrayList(getClass().getClassLoader());
mCurrentItemShowing = in.readInt();
}
private AdElementMime(Parcel source) {
boolean z = true;
this.errCode = -1;
this.hadExposed = false;
this.hadComplete = false;
this.vastTag = source.readInt();
this.adTag = source.readInt();
this.adReqType = source.readInt();
this.adZoneType = source.readInt();
this.cuePointType = source.readInt();
this.dspType = source.readInt();
this.hasProgressTracking = source.readInt();
this.commonType = source.readInt();
this.mediaFileUrl = source.readString();
this.mediaFileType = source.readInt();
this.duration = source.readInt();
this.clickShowType = source.readInt();
this.text = source.readString();
this.textEx = source.readString();
this.isRequestOffline = source.readInt();
this.vid = source.readString();
this.pid = source.readString();
this.sid = source.readString();
this.streamURL = source.readString();
this.index = source.readInt();
if (source.readInt() != 1) {
z = false;
}
this.hadExposed = z;
this.adAliList = source.readArrayList(AdAli.class.getClassLoader());
}
private SavedState(Parcel in) {
super(in);
mHour = in.readInt();
mMinute = in.readInt();
mIs24HourMode = (in.readInt() == 1);
mInKbMode = (in.readInt() == 1);
//noinspection unchecked
mTypedTimes = in.readArrayList(getClass().getClassLoader());
mCurrentItemShowing = in.readInt();
}
@Override
public FileTraversal createFromParcel(Parcel source) {
FileTraversal ft = new FileTraversal();
ft.filename = source.readString();
ft.filecontent = source.readArrayList(FileTraversal.class.getClassLoader());
return ft;
}
/**
* Unmarshalls a list of {@link Parcelable}.
* Workaround for bug: https://code.google.com/p/android/issues/detail?id=6822
*/
@SuppressWarnings("unchecked")
public static <T extends Parcelable> ArrayList<T> unmarshallParcelableList(byte[] bytes,
ClassLoader classLoader) {
Parcel parcel = Parcel.obtain();
parcel.unmarshall(bytes, 0, bytes.length);
parcel.setDataPosition(0);
return parcel.readArrayList(classLoader);
}
protected Pager(Parcel in) {
this.href = in.readString();
this.items = in.readArrayList(ArrayList.class.getClassLoader());
this.limit = in.readInt();
this.next = in.readString();
this.offset = in.readInt();
this.previous = in.readString();
this.total = in.readInt();
}
private PageStateSavedState(Parcel source) {
super(source);
mLoading = source.readInt();
mError = source.readInt();
mEmpty = source.readInt();
mLoadingColors = source.readArrayList(Integer.class.getClassLoader());
mEmptyRippleColor = source.readInt();
mEmptyImage = source.readInt();
mEmptyPromt = source.readString();
mErrorRippleColor = source.readInt();
mErrorImage = source.readInt();
mErrorPromt = source.readString();
}
public SavedState(Parcel in) {
super(in);
mThumbnailsPaths = in.readArrayList(String.class.getClassLoader());
mTakePictureFilePath = in.readString();
}
public MapPointPack(Parcel p) {
isPolygon = p.readInt() == 1;
resource = p.readInt();
points = p.readArrayList(getClass().getClassLoader());
}
protected MediaType(Parcel in) {
mimeType = in.readString();
colorFormats = in.readArrayList(ColorFormat.class.getClassLoader());
}