Java Code Examples for android.os.Parcel.readParcelable()

The following are Jave code examples for showing how to use readParcelable() of the android.os.Parcel class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
+ Save this method
Example 1
Project: mvvm-template   File: GitCommitModel.java   View Source Code Vote up 6 votes
protected GitCommitModel(Parcel in) {
    this.sha = in.readString();
    this.url = in.readString();
    this.message = in.readString();
    this.author = in.readParcelable(User.class.getClassLoader());
    this.committer = in.readParcelable(User.class.getClassLoader());
    this.tree = in.readParcelable(User.class.getClassLoader());
    this.distincted = in.readByte() != 0;

    this.parents = new RealmList<>();
    ArrayList<GitCommitModel> list = in.createTypedArrayList(GitCommitModel.CREATOR);
    if (list != null && list.size() > 0) {
        parents.addAll(list);
    }

    this.commentCount = in.readInt();
}
 
Example 2
Project: microMathematics   File: ReplaceState.java   View Source Code Vote up 6 votes
public EntryState(Parcel in)
{
    super();
    formulaId = in.readInt();
    type = FormulaBase.BaseType.values()[in.readInt()];
    data = in.readParcelable(getClass().getClassLoader());
}
 
Example 3
Project: BLPlayer   File: VideoDetailData.java   View Source Code Vote up 6 votes
protected CardBean(Parcel in) {
    this.DisplayRank = in.readString();
    this.approve = in.readByte() != 0;
    this.article = in.readInt();
    this.attention = in.readInt();
    this.birthday = in.readString();
    this.description = in.readString();
    this.face = in.readString();
    this.fans = in.readInt();
    this.friend = in.readInt();
    this.level_info = in.readParcelable(LevelInfoBean.class.getClassLoader());
    this.mid = in.readString();
    this.name = in.readString();
    this.nameplate = in.readParcelable(NameplateBean.class.getClassLoader());
    this.official_verify = in.readParcelable(OfficialVerifyBean.class.getClassLoader());
    this.pendant = in.readParcelable(PendantBean.class.getClassLoader());
    this.place = in.readString();
    this.rank = in.readString();
    this.regtime = in.readInt();
    this.sex = in.readString();
    this.sign = in.readString();
    this.spacesta = in.readInt();
    this.vip = in.readParcelable(VipBean.class.getClassLoader());
    this.attentions = new ArrayList<Integer>();
    in.readList(this.attentions, Integer.class.getClassLoader());
}
 
Example 4
Project: GitHub   File: SavedStateScrolling.java   View Source Code Vote up 6 votes
/**
 * Called by CREATOR.
 *
 * @param in na
 */
public SavedStateScrolling(Parcel in) {
    // Parcel 'in' has its parent(RecyclerView)'s saved state.
    // To restore it, class loader that loaded RecyclerView is required.
    Parcelable superState = in.readParcelable(RecyclerView.class.getClassLoader());
    this.superState = superState != null ? superState : EMPTY_STATE;

    prevFirstVisiblePosition = in.readInt();
    prevFirstVisibleChildHeight = in.readInt();
    prevScrolledChildrenHeight = in.readInt();
    prevScrollY = in.readInt();
    scrollY = in.readInt();
    childrenHeights = new SparseIntArray();
    final int numOfChildren = in.readInt();
    if (0 < numOfChildren) {
        for (int i = 0; i < numOfChildren; i++) {
            final int key = in.readInt();
            final int value = in.readInt();
            childrenHeights.put(key, value);
        }
    }
}
 
Example 5
Project: HeroVideo-master   File: UserLiveRoomStatusInfo.java   View Source Code Vote up 5 votes
protected UserLiveRoomStatusInfo(Parcel in)
{

    this.code = in.readInt();
    this.message = in.readString();
    this.data = in.readParcelable(DataBean.class.getClassLoader());
}
 
Example 6
Project: TPlayer   File: VirtualLocationService.java   View Source Code Vote up 5 votes
VLocConfig(Parcel in) {
    this.mode = in.readInt();
    this.cell = in.readParcelable(VCell.class.getClassLoader());
    this.allCell = in.createTypedArrayList(VCell.CREATOR);
    this.neighboringCell = in.createTypedArrayList(VCell.CREATOR);
    this.location = in.readParcelable(VLocation.class.getClassLoader());
}
 
Example 7
Project: FuelUp   File: Expense.java   View Source Code Vote up 5 votes
private Expense(Parcel in) {
    this.id = (Long) in.readValue(Long.class.getClassLoader());
    this.vehicle = in.readParcelable(Vehicle.class.getClassLoader());
    this.price = (BigDecimal) in.readSerializable();
    long tmpDate = in.readLong();
    this.date = tmpDate == -1 ? null : new Date(tmpDate);
    this.info = in.readString();
}
 
Example 8
Project: boohee_v5.6   File: SimpleShareContent.java   View Source Code Vote up 5 votes
protected SimpleShareContent(Parcel parcel) {
    if (parcel != null) {
        this.mShareContent = parcel.readString();
        this.mShareMedia = (UMediaObject) parcel.readParcelable(UMediaObject.class
                .getClassLoader());
    }
}
 
Example 9
Project: TPlayer   File: VPackage.java   View Source Code Vote up 5 votes
protected PermissionComponent(Parcel src) {
    info = src.readParcelable(ActivityInfo.class.getClassLoader());
    className = src.readString();
    metaData = src.readBundle(Bundle.class.getClassLoader());
    int N = src.readInt();
    intents = new ArrayList<>(N);
    while (N-- > 0) {
        intents.add(new IntentInfo(src));
    }
}
 
Example 10
Project: Assembler   File: RouterRequest.java   View Source Code Vote up 5 votes
protected RouterRequest(Parcel in) {
    uri = in.readParcelable(Uri.class.getClassLoader());
    bundle = in.readBundle();
    requestCode = in.readInt();
    optionsCompat = in.readBundle();
    isIntercepted = in.readByte() != 0;
}
 
Example 11
Project: BilibiliClient   File: UserCoinsInfo.java   View Source Code Vote up 5 votes
protected ListBean(Parcel in) {

        this.aid = in.readInt();
        this.pic = in.readString();
        this.title = in.readString();
        this.stat = in.readParcelable(StatBean.class.getClassLoader());
      }
 
Example 12
Project: Rotatable-Scalable-Font   File: WidgetTextBean.java   View Source Code Vote up 5 votes
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();
}
 
Example 13
Project: JewelryUI   File: ViewPager.java   View Source Code Vote up 5 votes
SavedState(Parcel in, ClassLoader loader) {
    super(in, loader);
    if (loader == null) {
        loader = getClass().getClassLoader();
    }
    position = in.readInt();
    adapterState = in.readParcelable(loader);
    this.loader = loader;
}
 
Example 14
Project: TPlayer   File: VPackage.java   View Source Code Vote up 4 votes
protected VPackage(Parcel in) {
    int N = in.readInt();
    this.activities = new ArrayList<>(N);
    while (N-- > 0) {
        activities.add(new ActivityComponent(in));
    }
    N = in.readInt();
    this.receivers = new ArrayList<>(N);
    while (N-- > 0) {
        receivers.add(new ActivityComponent(in));
    }
    N = in.readInt();
    this.providers = new ArrayList<>(N);
    while (N-- > 0) {
        providers.add(new ProviderComponent(in));
    }
    N = in.readInt();
    this.services = new ArrayList<>(N);
    while (N-- > 0) {
        services.add(new ServiceComponent(in));
    }
    N = in.readInt();
    this.instrumentation = new ArrayList<>(N);
    while (N-- > 0) {
        instrumentation.add(new InstrumentationComponent(in));
    }
    N = in.readInt();
    this.permissions = new ArrayList<>(N);
    while (N-- > 0) {
        permissions.add(new PermissionComponent(in));
    }
    N = in.readInt();
    this.permissionGroups = new ArrayList<>(N);
    while (N-- > 0) {
        permissionGroups.add(new PermissionGroupComponent(in));
    }
    this.requestedPermissions = in.createStringArrayList();
    this.protectedBroadcasts = in.createStringArrayList();
    this.applicationInfo = in.readParcelable(ApplicationInfo.class.getClassLoader());
    this.mAppMetaData = in.readBundle(Bundle.class.getClassLoader());
    this.packageName = in.readString();
    this.mPreferredOrder = in.readInt();
    this.mVersionName = in.readString();
    this.mSharedUserId = in.readString();
    this.usesLibraries = in.createStringArrayList();
    this.mVersionCode = in.readInt();
    this.mSharedUserLabel = in.readInt();
    this.configPreferences = in.createTypedArrayList(ConfigurationInfo.CREATOR);
    this.reqFeatures = in.createTypedArrayList(FeatureInfo.CREATOR);
}
 
Example 15
Project: BilibiliClient   File: UserChaseBangumiInfo.java   View Source Code Vote up 4 votes
protected UserChaseBangumiInfo(Parcel in) {

    this.status = in.readByte() != 0;
    this.data = in.readParcelable(DataBean.class.getClassLoader());
  }
 
Example 16
Project: trust-wallet-android   File: Token.java   View Source Code Vote up 4 votes
private Token(Parcel in) {
    tokenInfo = in.readParcelable(TokenInfo.class.getClassLoader());
    balance = new BigDecimal(in.readString());
}
 
Example 17
Project: AndroidBackendlessChat   File: FacebookDialog.java   View Source Code Vote up 4 votes
private PendingCall(Parcel in) {
    callId = UUID.fromString(in.readString());
    requestIntent = in.readParcelable(null);
    requestCode = in.readInt();
}
 
Example 18
Project: BilibiliClient   File: UserContributeInfo.java   View Source Code Vote up 4 votes
protected UserContributeInfo(Parcel in) {

    this.status = in.readByte() != 0;
    this.data = in.readParcelable(DataBean.class.getClassLoader());
  }
 
Example 19
Project: frogment   File: FrogmentData.java   View Source Code Vote up 4 votes
protected FrogmentData(Parcel in) {
    this.clazz = (Class<? extends Frogment>) in.readSerializable();
    this.state = in.readParcelable(FrogmentState.class.getClassLoader());
    this.tag = in.readString();
}
 
Example 20
Project: okuki   File: OkukiState.java   View Source Code Vote up 4 votes
private OkukiState(Parcel parcel) {
    currentPlace = parcel.readParcelable(WrappedPlace.class.getClassLoader());
    parcel.readTypedList(placeHistory, WrappedPlace.CREATOR);
}