下面列出了android.os.Parcel#readList ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
/**
* Reads an {@link AccessibilityRecord} from a parcel.
*
* @param record The record to initialize.
* @param parcel The parcel to read from.
*/
private void readAccessibilityRecordFromParcel(AccessibilityRecord record,
Parcel parcel) {
record.mBooleanProperties = parcel.readInt();
record.mCurrentItemIndex = parcel.readInt();
record.mItemCount = parcel.readInt();
record.mFromIndex = parcel.readInt();
record.mToIndex = parcel.readInt();
record.mScrollX = parcel.readInt();
record.mScrollY = parcel.readInt();
record.mScrollDeltaX = parcel.readInt();
record.mScrollDeltaY = parcel.readInt();
record.mMaxScrollX = parcel.readInt();
record.mMaxScrollY = parcel.readInt();
record.mAddedCount = parcel.readInt();
record.mRemovedCount = parcel.readInt();
record.mClassName = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
record.mContentDescription = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
record.mBeforeText = TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(parcel);
record.mParcelableData = parcel.readParcelable(null);
parcel.readList(record.mText, null);
record.mSourceWindowId = parcel.readInt();
record.mSourceNodeId = parcel.readLong();
record.mSealed = (parcel.readInt() == 1);
}
protected Comment(Parcel in) {
id = in.readLong();
body = in.readString();
body_html = in.readString();
long tmpCreated_at = in.readLong();
created_at = tmpCreated_at != -1 ? new Date(tmpCreated_at) : null;
depth = in.readInt();
vote_count = in.readInt();
user_id = in.readLong();
user_display_name = in.readString();
user_portrait_url = in.readString();
user_job = in.readString();
if (in.readByte() == 0x01) {
comments = new ArrayList<Comment>();
in.readList(comments, Comment.class.getClassLoader());
} else {
comments = null;
}
}
private FinishedApk(Parcel in) {
name = in.readString();
apkid = in.readString();
appHashId = in.readLong();
iconpath = in.readString();
path = in.readString();
permissionsList = new ArrayList<String>();
in.readList(permissionsList, null);
repoName = in.readString();
id = in.readLong();
referrer = in.readString();
Log.d("AptoideFinishApkParcOut", "Path" + path);
}
protected DataBean(Parcel in) {
this.head_block_num = in.readString();
this.refund_request = in.readParcelable(Object.class.getClassLoader());
this.total_resources = in.readParcelable(TotalResourcesBean.class.getClassLoader());
this.head_block_time = in.readString();
this.created = in.readString();
this.ram_quota = in.readString();
this.net_limit = in.readParcelable(NetLimitBean.class.getClassLoader());
this.self_delegated_bandwidth = in.readParcelable(Object.class.getClassLoader());
this.net_weight = in.readString();
this.cpu_weight = in.readString();
this.privileged = in.readByte() != 0;
this.ram_usage = in.readString();
this.account_name = in.readString();
this.last_code_update = in.readString();
this.cpu_limit = in.readParcelable(CpuLimitBean.class.getClassLoader());
this.voter_info = in.readParcelable(VoterInfoBean.class.getClassLoader());
this.permissions = new ArrayList<PermissionsBean>();
in.readList(this.permissions, PermissionsBean.class.getClassLoader());
}
@SuppressWarnings({
"unchecked"
})
public Result createFromParcel(Parcel in) {
Result instance = new Result();
instance.id = ((String) in.readValue((String.class.getClassLoader())));
instance.createdAt = ((String) in.readValue((String.class.getClassLoader())));
instance.updatedAt = ((String) in.readValue((String.class.getClassLoader())));
instance.width = ((Integer) in.readValue((Integer.class.getClassLoader())));
instance.height = ((Integer) in.readValue((Integer.class.getClassLoader())));
instance.color = ((String) in.readValue((String.class.getClassLoader())));
instance.likes = ((Integer) in.readValue((Integer.class.getClassLoader())));
instance.likedByUser = ((Boolean) in.readValue((Boolean.class.getClassLoader())));
instance.user = ((User) in.readValue((User.class.getClassLoader())));
in.readList(instance.currentUserCollections, (java.lang.Object.class.getClassLoader()));
instance.urls = ((Urls) in.readValue((Urls.class.getClassLoader())));
in.readList(instance.categories, (Category.class.getClassLoader()));
instance.links = ((Links) in.readValue((Links.class.getClassLoader())));
return instance;
}
private PaymentServices(Parcel in) {
id = in.readInt();
short_name = in.readString();
name = in.readString();
if(types==null)
types = new ArrayList<PaymentType>();
in.readList(types, PaymentType.class.getClassLoader());
price = in.readDouble();
currency=in.readString();
taxRate=in.readDouble();
sign= in.readString();
service_id= in.readString();
inapp_secret= in.readString();
}
@Ignore
protected ProvisionedMeshNode(Parcel in) {
//noinspection ConstantConditions
uuid = in.readString();
isConfigured = in.readByte() != 1;
nodeName = in.readString();
in.readList(mAddedNetKeys, NodeKey.class.getClassLoader());
mFlags = in.createByteArray();
unicastAddress = in.readInt();
deviceKey = in.createByteArray();
ttl = (Integer) in.readValue(Integer.class.getClassLoader());
sequenceNumber = in.readInt();
companyIdentifier = (Integer) in.readValue(Integer.class.getClassLoader());
productIdentifier = (Integer) in.readValue(Integer.class.getClassLoader());
versionIdentifier = (Integer) in.readValue(Integer.class.getClassLoader());
crpl = (Integer) in.readValue(Integer.class.getClassLoader());
nodeFeatures = (Features) in.readValue(Features.class.getClassLoader());
in.readMap(mElements, Element.class.getClassLoader());
sortElements(mElements);
in.readList(mAddedAppKeys, NodeKey.class.getClassLoader());
mTimeStampInMillis = in.readLong();
mSeqAuth = in.readParcelable(SparseIntArrayParcelable.class.getClassLoader());
secureNetworkBeaconSupported = (Boolean) in.readValue(Boolean.class.getClassLoader());
networkTransmitSettings = in.readParcelable(NetworkTransmitSettings.class.getClassLoader());
relaySettings = in.readParcelable(RelaySettings.class.getClassLoader());
blackListed = in.readInt() != 1;
}
private Credits(Parcel in) {
if (in.readByte() == BYTE) {
mCast = new ArrayList<>();
in.readList(mCast, Cast.class.getClassLoader());
} else {
mCast = null;
}
if (in.readByte() == BYTE) {
mCrew = new ArrayList<>();
in.readList(mCrew, Crew.class.getClassLoader());
} else {
mCrew = null;
}
}
protected Movies(Parcel in) {
this.title = in.readString();
this.id = in.readString();
this.posterURL = in.readString();
this.plot = in.readString();
this.rating = in.readString();
this.date = in.readString();
this.genreIds = new ArrayList<>();
in.readList(this.genreIds, Integer.class.getClassLoader());
this.videoImage = in.readString();
this.voteCount = in.readString();
}
InstantAppIntentFilter(Parcel in) {
mSplitName = in.readString();
in.readList(mFilters, null /*loader*/);
}
protected PackageOps(Parcel in) {
this.mPackageName = in.readString();
this.mUid = in.readInt();
this.mEntries = new ArrayList<OpEntry>();
in.readList(this.mEntries, OpEntry.class.getClassLoader());
}
/**
* Constructor called from {@link #CREATOR}
*/
private SavedState(Parcel in) {
super(in);
expandedGroupMetadataList = new ArrayList<ExpandableListConnector.GroupMetadata>();
in.readList(expandedGroupMetadataList, ExpandableListConnector.class.getClassLoader());
}
@Override protected void readFromParcel(Parcel source) {
loadedData = (D) new ArrayList<Parcelable>();
source.readList(loadedData, getClassLoader());
super.readFromParcel(source);
}
protected Feed(Parcel in) {
maxAcceptedPayoutValue = in.readString();
isResteemed = in.readByte() != 0x00;
author = in.readString();
permlink = in.readString();
category = in.readString();
parentAuthor = in.readString();
parentPermlink = in.readString();
title = in.readString();
body = in.readString();
cleanedBody = in.readString();
featuredImageUrl = in.readString();
format = in.readString();
if (in.readByte() == 0x01) {
tags = new ArrayList<String>();
in.readList(tags, String.class.getClassLoader());
} else {
tags = null;
}
createdAt = in.readString();
depth = in.readInt();
children = in.readInt();
totalPayoutValue = in.readString();
curatorPayoutValue = in.readString();
rootAuthor = in.readString();
rootPermlink = in.readString();
url = in.readString();
pendingPayoutValue = in.readString();
totalPendingPayoutValue = in.readString();
cashOutTime = in.readString();
if (in.readByte() == 0x01) {
voters = new ArrayList<Voter>();
in.readList(voters, Voter.class.getClassLoader());
} else {
voters = null;
}
if (in.readByte() == 0x01) {
activeVoters = new ArrayList<Voter>();
in.readList(activeVoters, Voter.class.getClassLoader());
} else {
activeVoters = null;
}
authorReputation = in.readString();
rank = in.readInt();
prize = in.readString();
}
private SignatureSavedState(Parcel in) {
super(in);
this.points = new ArrayList<>();
in.readList(points, LinePathPoint.class.getClassLoader());
}
@Override protected void readFromParcel(Parcel source) {
loadedData = (D) new ArrayList<Parcelable>();
source.readList(loadedData, getClassLoader());
super.readFromParcel(source);
}
protected TrackToRemoveWithPosition(Parcel in) {
this.uri = in.readString();
this.positions = new ArrayList<Integer>();
in.readList(this.positions, List.class.getClassLoader());
}
private DayOfWeekUSourceData(Parcel in) {
ArrayList<Integer> list = new ArrayList<>();
in.readList(list, null);
days.clear();
days.addAll(list);
}
private SketchFile(Parcel source) {
initFragment();
title = source.readString();
suffix = source.readString();
undo = new LinkedList<>();
redo = new LinkedList<>();
source.readList(undo, getClass().getClassLoader());
source.readList(redo, getClass().getClassLoader());
enabled = source.readByte() != 0;
tabNum = source.readInt();
text = source.readString();
selectionStart = source.readInt();
selectionEnd = source.readInt();
scrollX = source.readInt();
scrollY = source.readInt();
compilerProblems = new ArrayList<>();
}
protected CardPresenter(Parcel in) {
in.readList(mImages, Uri.class.getClassLoader());
mText = in.readString();
mFooter = in.readString();
mPendingIntent = in.readParcelable(PendingIntent.class.getClassLoader());
}