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:id.satusatudua.sigap.data.model.ImportantContact.java

protected ImportantContact(Parcel in) {
    contactId = in.readString();//from w  ww  .jav a  2  s .co  m
    name = in.readString();
    phoneNumber = in.readString();
    userId = in.readString();
    address = in.readString();
    createdAt = new Date(in.readLong());
    avgRate = in.readDouble();
    totalRate = in.readDouble();
    totalUserRate = in.readLong();
    myRate = in.readInt();
    bookmarked = in.readByte() != 0;
    user = in.readParcelable(User.class.getClassLoader());
}

From source file:com.itude.mobile.mobbl.core.model.MBElement.java

private MBElement(Parcel in) {
    _values = new HashMap<String, String>();

    Bundle valueBundle = in.readBundle();

    for (String key : valueBundle.keySet()) {
        _values.put(key, valueBundle.getString(key));
    }/*  w ww. j  a v  a2s. c  om*/

    _definition = in.readParcelable(MBElementDefinition.class.getClassLoader());
}

From source file:nuclei.ui.share.PackageTargetManager.java

protected PackageTargetManager(Parcel in) {
    mFacebookId = in.readString();//from   w ww .j av a 2s .  c  o m
    mText = in.readString();
    mUrl = in.readString();
    mSms = in.readString();
    mEmail = in.readString();
    mSubject = in.readString();
    mFile = (File) in.readSerializable();
    mUri = in.readParcelable(getClass().getClassLoader());
}

From source file:com.vk.sdk.api.model.VKApiPhotoAlbum.java

/**
 * Creates a PhotoAlbum instance from Parcel.
 *//*from w  ww.  j  a v  a 2  s. co m*/
public VKApiPhotoAlbum(Parcel in) {
    this.id = in.readInt();
    this.title = in.readString();
    this.size = in.readInt();
    this.privacy = in.readInt();
    this.description = in.readString();
    this.owner_id = in.readInt();
    this.can_upload = in.readByte() != 0;
    this.updated = in.readLong();
    this.created = in.readLong();
    this.thumb_id = in.readInt();
    this.thumb_src = in.readString();
    this.photo = in.readParcelable(VKPhotoSizes.class.getClassLoader());
}

From source file:saphion.batterycaster.providers.Alarm.java

Alarm(Parcel p) {
    id = p.readLong();/*from  w w w . j av a2  s.  c o  m*/
    enabled = p.readInt() == 1;
    battery = p.readInt();
    charge = p.readInt();
    daysOfWeek = new DaysOfWeek(p.readInt());
    vibrate = p.readInt() == 1;
    label = p.readString();
    alert = (Uri) p.readParcelable(null);
    deleteAfterUse = p.readInt() == 1;
}

From source file:com.vk.sdk.api.model.VKApiCommunity.java

/**
 * Creates a community object from Parcel
 *///from   w  w w .j  a v a2  s  .c  om
public VKApiCommunity(Parcel in) {
    super(in);
    this.name = in.readString();
    this.screen_name = in.readString();
    this.is_closed = in.readInt();
    this.is_admin = in.readByte() != 0;
    this.admin_level = in.readInt();
    this.is_member = in.readByte() != 0;
    this.type = in.readInt();
    this.photo_50 = in.readString();
    this.photo_100 = in.readString();
    this.photo_200 = in.readString();
    this.photo = in.readParcelable(VKPhotoSizes.class.getClassLoader());
}

From source file:at.diamonddogs.data.adapter.parcelable.ParcelableAdapterWebRequest.java

/**
 * Required by Parcelable mechanism//from   ww w. ja  va2  s .  co  m
 * 
 * @param in
 *            the input parcel
 */
public ParcelableAdapterWebRequest(Parcel in) {
    super(in);
    if (dataObject == null) {
        dataObject = new WebRequest();
    }
    dataObject.setProcessorId(in.readInt());
    dataObject.setRequestType((Type) in.readSerializable());
    dataObject.setUrl((URL) in.readSerializable());
    dataObject.setReadTimeout(in.readInt());
    dataObject.setConnectionTimeout(in.readInt());
    dataObject.setFollowRedirects(in.readInt() == 1);

    boolean first = (in.readInt() == 1);
    if (first) {
        ParcelableAdapterTempFile tmp = in.readParcelable(ClassLoader.getSystemClassLoader());
        dataObject.setTmpFile(new Pair<Boolean, TempFile>(first, tmp.getDataObject()));
    }

    dataObject.setHeader(readStringMap(in));
    dataObject.setCacheTime(in.readLong());
    dataObject.setNumberOfRetries(in.readInt());
    dataObject.setRetryInterval(in.readInt());

    dataObject.setCancelled(in.readInt() == 1);
    dataObject.setCheckConnectivity(in.readInt() == 1);
    dataObject.setCheckConnectivityPing(in.readInt() == 1);
    dataObject.setUseOfflineCache(in.readInt() == 1);

}

From source file:org.alfresco.mobile.android.api.services.impl.onpremise.OnPremiseSiteServiceImpl.java

public OnPremiseSiteServiceImpl(Parcel o) {
    super((AlfrescoSession) o.readParcelable(RepositorySessionImpl.class.getClassLoader()));
}

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

public Quilt(Parcel in) {
    m_new = in.readInt() == 0 ? false : true;
    m_rowCount = in.readInt();//from  ww w  .j  a v  a 2s  .c o m
    m_columnCount = in.readInt();
    m_width = in.readFloat();
    m_height = in.readFloat();
    m_rows = new ArrayList<ArrayList<QuiltBlock>>();

    for (int row = 0; row < m_rowCount; ++row) {
        for (int column = 0; column < m_columnCount; ++column) {
            QuiltBlock quiltBlock = (QuiltBlock) in.readParcelable(QuiltBlock.class.getClassLoader());
            setQuiltBlock(row, column, quiltBlock);
        }
    }
}

From source file:com.nextgis.maplib.datasource.ngw.Connection.java

protected Connection(Parcel in) {
    mName = in.readString();/*from w ww .ja v a 2  s  .  c  om*/
    mLogin = in.readString();
    mPassword = in.readString();
    mURL = in.readString();
    mIsConnected = in.readByte() == 1;
    mCookie = in.readString();
    mId = in.readInt();
    int count = in.readInt();
    mSupportedTypes = new ArrayList<>();
    for (int i = 0; i < count; i++)
        mSupportedTypes.add(in.readInt());
    mRootResource = in.readParcelable(ResourceGroup.class.getClassLoader());
    mRootResource.setConnection(this);
    mRootResource.setParent(this);
}