Example usage for android.os Parcel readTypedList

List of usage examples for android.os Parcel readTypedList

Introduction

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

Prototype

public final <T> void readTypedList(List<T> list, Parcelable.Creator<T> c) 

Source Link

Document

Read into the given List items containing a particular object type that were written with #writeTypedList at the current dataPosition().

Usage

From source file:Main.java

public static <T> List<T> readTypedListOrNUll(Parcel parcel, Parcelable.Creator<T> creator) {
    List<T> result = new ArrayList<>();
    parcel.readTypedList(result, creator);
    if (result.isEmpty())
        return null;
    return result;
}

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

protected Route(Parcel in) {
    duration = in.readInt();/*from   www . ja 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:com.example.propertylist.handler.JsonPropertyHandler.java

private void readFromParcel(Parcel in) {
    in.readTypedList(propertyList, Property.CREATOR);
}

From source file:com.getchute.android.photopickerplus.models.MediaResponseModel.java

public MediaResponseModel(Parcel in) {
    this();/*from w ww.j ava  2  s.c  om*/
    in.readTypedList(assetList, AssetModel.CREATOR);
    clientId = in.readString();
    createdAt = in.readString();
    storeId = in.readString();
    updatedAt = in.readString();
    parcel = in.readParcelable(ParcelModel.class.getClassLoader());
    profile = in.readParcelable(ProfileModel.class.getClassLoader());
}

From source file:com.getchute.android.photopickerplus.models.MediaModel.java

public MediaModel(Parcel in) {
    this();//from  w  w  w  .j a  va 2  s .c  o  m
    options = in.readParcelable(OptionsModel.class.getClassLoader());
    in.readTypedList(media, MediaDataModel.CREATOR);

}

From source file:com.cas.model.CourseContent.java

private CourseContent(Parcel in) {
    this.id = in.readInt();
    this.name = in.readString();
    this.visible = in.readInt();
    this.summary = in.readString();
    in.readTypedList(this.modules, Module.CREATOR);
}

From source file:com.cas.model.Course.java

private Course(Parcel in) {
    this.id = in.readInt();
    this.shortname = in.readString();
    this.fullname = in.readString();
    this.enrolledusercount = in.readInt();
    this.idnumber = in.readString();
    this.visible = in.readInt();
    in.readTypedList(this.coursecontents, CourseContent.CREATOR);
}

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  w ww  . j av  a2 s . c  om*/
        String json = in.readString();
        if (!TextUtils.isEmpty(json)) {
            metadata = new JSONObject(json);
        }
    } catch (JSONException ignored) {
    }
}

From source file:com.richtodd.android.quiltdesign.block.PaperPiecedBlock.java

private PaperPiecedBlock(Parcel in) {
    m_dirty = in.readInt() == 0 ? false : true;
    m_width = in.readFloat();/*from  w  w  w .j a  va  2s .  co m*/
    m_height = in.readFloat();
    m_backgroundColor = in.readInt();
    m_pieces = new ArrayList<PaperPiecedBlockPiece>();

    in.readTypedList(m_pieces, PaperPiecedBlockPiece.CREATOR);

    m_backgroundPaint = new Paint();
    m_backgroundPaint.setStyle(Style.FILL);
    m_backgroundPaint.setColor(m_backgroundColor);

    m_backgroundPaintWhite = new Paint();
    m_backgroundPaintWhite.setStyle(Style.FILL);
    m_backgroundPaintWhite.setColor(Color.WHITE);
}

From source file:com.lugia.timetable.Subject.java

/**
 * Constructor for Parcelable.//from w  w  w .j  ava2 s. co m
 *
 * @param parcel the parcel.
 */
private Subject(Parcel parcel) {
    mSubjectCode = parcel.readString();
    mSubjectDescription = parcel.readString();
    mLectureSection = parcel.readString();
    mTutorialSection = parcel.readString();

    mCreditHours = parcel.readInt();
    mColor = parcel.readInt();

    parcel.readTypedList(mSchedule = new ArrayList<Schedule>(), Schedule.CREATOR);
    parcel.readTypedList(mEvent = new ArrayList<Event>(), Event.CREATOR);
}