下面列出了android.os.Parcel#readTypedList ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
public MessageListBean createFromParcel(Parcel in) {
MessageListBean messageListBean = new MessageListBean();
messageListBean.total_number = in.readInt();
messageListBean.previous_cursor = in.readString();
messageListBean.next_cursor = in.readString();
messageListBean.statuses = new ArrayList<MessageBean>();
in.readTypedList(messageListBean.statuses, MessageBean.CREATOR);
messageListBean.ad = new ArrayList<AdBean>();
in.readTypedList(messageListBean.ad, AdBean.CREATOR);
messageListBean.removedCount = in.readInt();
return messageListBean;
}
protected User(Parcel in) {
this.id = ((String) in.readValue((String.class.getClassLoader())));
this.updatedAt = ((String) in.readValue((String.class.getClassLoader())));
this.username = ((String) in.readValue((String.class.getClassLoader())));
this.name = ((String) in.readValue((String.class.getClassLoader())));
this.firstName = ((String) in.readValue((String.class.getClassLoader())));
this.lastName = ((String) in.readValue((String.class.getClassLoader())));
this.instagramUsername = ((String) in.readValue((String.class.getClassLoader())));
this.twitterUsername = ((String) in.readValue((String.class.getClassLoader())));
this.portfolioUrl = ((Object) in.readValue((Object.class.getClassLoader())));
this.bio = ((String) in.readValue((String.class.getClassLoader())));
this.location = ((String) in.readValue((String.class.getClassLoader())));
this.totalLikes = ((Integer) in.readValue((Integer.class.getClassLoader())));
this.totalPhotos = ((Integer) in.readValue((Integer.class.getClassLoader())));
this.totalCollections = ((Integer) in.readValue((Integer.class.getClassLoader())));
this.followedByUser = ((Boolean) in.readValue((Boolean.class.getClassLoader())));
this.followersCount = ((Integer) in.readValue((Integer.class.getClassLoader())));
this.followingCount = ((Integer) in.readValue((Integer.class.getClassLoader())));
this.downloads = ((Integer) in.readValue((Integer.class.getClassLoader())));
this.profileImage = ((ProfileImage) in.readValue((ProfileImage.class.getClassLoader())));
this.badge = ((Badge) in.readValue((Badge.class.getClassLoader())));
this.links = ((Links) in.readValue((Links.class.getClassLoader())));
this.currentUserCollections = new ArrayList<>();
in.readTypedList(this.currentUserCollections, CurrentUserCollection.CREATOR);
}
public TopicResultListBean createFromParcel(Parcel in) {
TopicResultListBean topicResultListBean = new TopicResultListBean();
topicResultListBean.total_number = in.readInt();
topicResultListBean.previous_cursor = in.readString();
topicResultListBean.next_cursor = in.readString();
topicResultListBean.statuses = new ArrayList<MessageBean>();
in.readTypedList(topicResultListBean.statuses, MessageBean.CREATOR);
return topicResultListBean;
}
public SearchStatusListBean createFromParcel(Parcel in) {
SearchStatusListBean searchStatusListBean = new SearchStatusListBean();
searchStatusListBean.total_number = in.readInt();
searchStatusListBean.previous_cursor = in.readString();
searchStatusListBean.next_cursor = in.readString();
searchStatusListBean.statuses = new ArrayList<MessageBean>();
in.readTypedList(searchStatusListBean.statuses, MessageBean.CREATOR);
return searchStatusListBean;
}
public ShareListBean createFromParcel(Parcel in) {
ShareListBean shareListBean = new ShareListBean();
shareListBean.total_number = in.readInt();
shareListBean.previous_cursor = in.readString();
shareListBean.next_cursor = in.readString();
shareListBean.url_long = in.readString();
shareListBean.url_short = in.readString();
shareListBean.share_statuses = new ArrayList<MessageBean>();
in.readTypedList(shareListBean.share_statuses, MessageBean.CREATOR);
return shareListBean;
}
@Override
public MessageModel createFromParcel(Parcel in) {
MessageModel ret = new MessageModel();
ret.created_at = in.readString();
ret.id = in.readLong();
ret.mid = in.readLong();
ret.idstr = in.readString();
ret.text = in.readString();
ret.source = in.readString();
boolean[] array = new boolean[2];
in.readBooleanArray(array);
ret.favorited = array[0];
ret.truncated = array[1];
ret.in_reply_to_status_id = in.readString();
ret.in_reply_to_user_id = in.readString();
ret.in_reply_to_screen_name = in.readString();
ret.thumbnail_pic = in.readString();
ret.bmiddle_pic = in.readString();
ret.original_pic = in.readString();
ret.geo = in.readParcelable(GeoModel.class.getClassLoader());
ret.user = in.readParcelable(UserModel.class.getClassLoader());
ret.retweeted_status = in.readParcelable(MessageModel.class.getClassLoader());
ret.reposts_count = in.readInt();
ret.comments_count = in.readInt();
ret.attitudes_count = in.readInt();
in.readTypedList(ret.pic_urls, PictureUrl.CREATOR);
return ret;
}
public DMUserListBean createFromParcel(Parcel in) {
DMUserListBean dmUserListBean = new DMUserListBean();
dmUserListBean.total_number = in.readInt();
dmUserListBean.previous_cursor = in.readString();
dmUserListBean.next_cursor = in.readString();
dmUserListBean.user_list = new ArrayList<DMUserBean>();
in.readTypedList(dmUserListBean.user_list, DMUserBean.CREATOR);
return dmUserListBean;
}
public FavListBean createFromParcel(Parcel in) {
FavListBean favListBean = new FavListBean();
favListBean.total_number = in.readInt();
favListBean.previous_cursor = in.readString();
favListBean.next_cursor = in.readString();
favListBean.favorites = new ArrayList<>();
in.readTypedList(favListBean.favorites, FavBean.CREATOR);
favListBean.actualStore = new ArrayList<>();
in.readTypedList(favListBean.actualStore, MessageBean.CREATOR);
return favListBean;
}
public DMListBean createFromParcel(Parcel in) {
DMListBean dmListBean = new DMListBean();
dmListBean.total_number = in.readInt();
dmListBean.previous_cursor = in.readString();
dmListBean.next_cursor = in.readString();
dmListBean.direct_messages = new ArrayList<DMBean>();
in.readTypedList(dmListBean.direct_messages, DMBean.CREATOR);
return dmListBean;
}
public UserListBean createFromParcel(Parcel in) {
UserListBean userListBean = new UserListBean();
userListBean.total_number = in.readInt();
userListBean.previous_cursor = in.readInt();
userListBean.next_cursor = in.readInt();
userListBean.users = new ArrayList<UserBean>();
in.readTypedList(userListBean.users, UserBean.CREATOR);
return userListBean;
}
public NearbyStatusListBean createFromParcel(Parcel in) {
NearbyStatusListBean nearbyStatusListBean = new NearbyStatusListBean();
nearbyStatusListBean.total_number = in.readInt();
nearbyStatusListBean.previous_cursor = in.readString();
nearbyStatusListBean.next_cursor = in.readString();
nearbyStatusListBean.statuses = new ArrayList<MessageBean>();
in.readTypedList(nearbyStatusListBean.statuses, MessageBean.CREATOR);
return nearbyStatusListBean;
}
private Weather(Parcel in) {
temperature = in.readFloat();
lon = in.readFloat();
lat = in.readFloat();
windSpeed = in.readFloat();
windDirection = in.readFloat();
pressure = in.readFloat();
humidity = in.readInt();
clouds = in.readInt();
sunrise = in.readLong();
sunset = in.readLong();
in.readTypedList(currentWeathers, CurrentWeather.CREATOR);
}
protected ContactResult(Parcel in) {
this.mContactID = in.readString();
this.mDisplayName = in.readString();
this.mStarred = in.readByte() != 0;
this.mPhoto = in.readParcelable(Uri.class.getClassLoader());
this.mThumbnail = in.readParcelable(Uri.class.getClassLoader());
this.mEmails = in.createStringArrayList();
in.readTypedList(this.mPhoneNumbers, PhoneNumber.CREATOR);
}
private GetGroupMembersResponse(Parcel in) {
in.readTypedList(members, SocialMember.CREATOR);
}
protected Photo(Parcel in)
{
aid = in.readString();
aid_cursor = in.readString();
album_object_id = in.readString();
album_object_id_cursor = in.readString();
backdated_time = in.readString();
backdated_time_granularity = in.readString();
can_backdate = in.readByte() != 0x00;
can_delete = in.readByte() != 0x00;
can_tag = in.readByte() != 0x00;
caption = in.readString();
caption_tags = in.readString();
comment_info = in.readParcelable(CommentInfo.class.getClassLoader());
created = in.readString();
images = new ArrayList<Image>();
in.readTypedList(images, Image.CREATOR);
like_info = in.readParcelable(LikeInfo.class.getClassLoader());
link = in.readString();
modified = in.readString();
object_id = in.readString();
offline_id = in.readString();
owner = in.readString();
owner_name = in.readString();
owner_type = in.readString();
owner_pic = in.readString();
owner_cursor = in.readString();
page_story_id = in.readString();
pid = in.readString();
place_id = in.readString();
place_name = in.readString();
src = in.readString();
src_big = in.readString();
src_big_height = in.readInt();
src_big_width = in.readInt();
src_height = in.readInt();
src_small = in.readString();
src_small_height = in.readInt();
src_small_width = in.readInt();
src_width = in.readInt();
target_id = in.readString();
target_name = in.readString();
target_type = in.readString();
}
private void readFromParcel(Parcel in) {
mPreviewResourceId = in.readInt();
mLookResourceId = in.readInt();
mLookItems = new ArrayList<LookItem>();
in.readTypedList(mLookItems, LookItem.CREATOR);
}
public BTDeviceProfile(Parcel in) {
mDeviceAddress = in.readString();
mConnectionState = in.readInt();
mServiceProfileList = new ArrayList<BTServiceProfile>();
in.readTypedList(mServiceProfileList, BTServiceProfile.CREATOR);
}
private OkukiState(Parcel parcel) {
currentPlace = parcel.readParcelable(WrappedPlace.class.getClassLoader());
parcel.readTypedList(placeHistory, WrappedPlace.CREATOR);
}
public ReplaceState(Parcel in)
{
super();
in.readTypedList(entries, EntryState.CREATOR);
}
public GroupListBean createFromParcel(Parcel in) {
GroupListBean groupListBean = new GroupListBean();
groupListBean.total_number = in.readString();
groupListBean.lists = new ArrayList<GroupBean>();
in.readTypedList(groupListBean.lists, GroupBean.CREATOR);
return groupListBean;
}