Example usage for android.os Parcel readParcelable

List of usage examples for android.os Parcel readParcelable

Introduction

In this page you can find the example usage for android.os Parcel readParcelable.

Prototype

@SuppressWarnings("unchecked")
public final <T extends Parcelable> T readParcelable(ClassLoader loader) 

Source Link

Document

Read and return a new Parcelable from the parcel.

Usage

From source file:com.facebook.notifications.internal.configuration.CardConfiguration.java

private CardConfiguration(@NonNull Parcel source) {
    ClassLoader loader = getClass().getClassLoader();

    cardSize = source.readParcelable(loader);
    cornerRadius = source.readFloat();//from   w ww.j a  va2s.co  m
    contentInset = source.readFloat();

    backdropColor = source.readInt();

    heroConfiguration = source.readParcelable(loader);
    bodyConfiguration = source.readParcelable(loader);
    actionsConfiguration = source.readParcelable(loader);
}

From source file:com.liferay.alerts.model.Alert.java

private Alert(Parcel parcel) {
    _id = parcel.readLong();//from   ww w . j a v  a  2 s .c  om
    _user = parcel.readParcelable(User.class.getClassLoader());
    _userId = _user.getId();

    try {
        _payload = new JSONObject(parcel.readString());
    } catch (JSONException je) {
    }

    _read = (parcel.readInt() == 1);
    _timestamp = parcel.readLong();
}

From source file:com.paymaya.sdk.android.checkout.models.Checkout.java

public Checkout(Parcel in) {
    totalAmount = in.readParcelable(TotalAmount.class.getClassLoader());
    buyer = in.readParcelable(Buyer.class.getClassLoader());

    itemList = new ArrayList<>();
    in.readTypedList(itemList, Item.CREATOR);

    redirectUrl = in.readParcelable(RedirectUrl.class.getClassLoader());
    requestReferenceNumber = in.readString();
    isAutoRedirect = in.readByte() != 0;

    try {/*from  ww w .  j  av  a2 s  .  c o m*/
        String json = in.readString();
        if (!TextUtils.isEmpty(json)) {
            metadata = new JSONObject(json);
        }
    } catch (JSONException ignored) {
    }
}

From source file:com.facebook.notifications.internal.configuration.ActionsConfiguration.java

private ActionsConfiguration(Parcel source) {
    ClassLoader loader = getClass().getClassLoader();

    style = source.readParcelable(loader);
    layoutStyle = source.readParcelable(loader);

    background = source.readParcelable(loader);

    topInset = source.readFloat();//w ww .  j  a va  2  s. com
    contentInset = source.readFloat();
    cornerRadius = source.readFloat();

    actions = source.createTypedArray(ActionConfiguration.CREATOR);
    height = source.readFloat();
}

From source file:org.onepf.opfmaps.osmdroid.model.BitmapDescriptor.java

private BitmapDescriptor(@NonNull final Parcel parcel) {
    this.source = BitmapSource.valueOf(parcel.readString());
    this.image = parcel.readParcelable(Bitmap.class.getClassLoader());
    this.path = parcel.readString();
    this.hue = parcel.readFloat();
    this.resourceId = parcel.readInt();
}

From source file:com.markupartist.sthlmtraveling.data.models.Route.java

protected Route(Parcel in) {
    duration = in.readInt();/*w ww.j  a  v  a  2 s. c om*/
    legs = new ArrayList<>();
    in.readTypedList(legs, Leg.CREATOR);
    mode = in.readString();
    fare = in.readParcelable(Fare.class.getClassLoader());
}

From source file:fr.free.nrw.commons.contributions.Contribution.java

public Contribution(Parcel in) {
    super(in);/*from ww  w  . ja  v  a2 s .  c om*/
    contentUri = in.readParcelable(Uri.class.getClassLoader());
    source = in.readString();
    state = in.readInt();
    transferred = in.readLong();
    isMultiple = in.readInt() == 1;
}

From source file:com.patloew.navigationviewfragmentadapters.StateMap.java

public StateMap(Parcel in) {
    ClassLoader classLoader = getClass().getClassLoader();

    int size = in.readInt();
    map = new HashMap<>(size);

    for (int i = 0; i < size; i++) {
        map.put(in.readString(), (Fragment.SavedState) in.readParcelable(classLoader));
    }//  w w  w  . ja v a  2 s  .co  m
}

From source file:com.facebook.notifications.internal.configuration.ActionConfiguration.java

private ActionConfiguration(Parcel source) {
    ClassLoader classLoader = getClass().getClassLoader();

    backgroundColor = source.readInt();/* w ww . j a  v a 2  s .c o m*/
    borderColor = source.readInt();

    borderWidth = source.readFloat();
    content = source.readParcelable(classLoader);

    actionUri = source.readParcelable(classLoader);
}

From source file:com.danlvse.weebo.model.Comment.java

protected Comment(Parcel in) {
    this.created_at = in.readString();
    this.id = in.readString();
    this.text = in.readString();
    this.source = in.readString();
    this.user = in.readParcelable(User.class.getClassLoader());
    this.mid = in.readString();
    this.idstr = in.readString();
    this.status = in.readParcelable(Feed.class.getClassLoader());
    this.reply_comment = in.readParcelable(Comment.class.getClassLoader());
}