Example usage for android.os Parcel readInt

List of usage examples for android.os Parcel readInt

Introduction

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

Prototype

public final int readInt() 

Source Link

Document

Read an integer value from the parcel at the current dataPosition().

Usage

From source file:com.google.sample.beaconservice.Beacon.java

private Beacon(Parcel source) {
    type = source.readString();//from   www. java 2s  .  c om
    int len = source.readInt();
    id = new byte[len];
    source.readByteArray(id);
    status = source.readString();
    if (source.readInt() == 1) {
        placeId = source.readString();
    }
    if (source.readInt() == 1) {
        latitude = source.readDouble();
    }
    if (source.readInt() == 1) {
        longitude = source.readDouble();
    }
    if (source.readInt() == 1) {
        expectedStability = source.readString();
    }
    if (source.readInt() == 1) {
        description = source.readString();
    }
}

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

/**
 * Creates a Post instance from Parcel./*from w w  w .  j a v a 2s  . c o m*/
 */
public VKApiPost(Parcel in) {
    this.id = in.readInt();
    this.to_id = in.readInt();
    this.from_id = in.readInt();
    this.date = in.readLong();
    this.text = in.readString();
    this.reply_owner_id = in.readInt();
    this.reply_post_id = in.readInt();
    this.friends_only = in.readByte() != 0;
    this.comments_count = in.readInt();
    this.can_post_comment = in.readByte() != 0;
    this.likes_count = in.readInt();
    this.user_likes = in.readByte() != 0;
    this.can_like = in.readByte() != 0;
    this.can_publish = in.readByte() != 0;
    this.reposts_count = in.readInt();
    this.user_reposted = in.readByte() != 0;
    this.post_type = in.readString();
    this.attachments = in.readParcelable(VKAttachments.class.getClassLoader());
    this.geo = in.readParcelable(VKApiPlace.class.getClassLoader());
    this.signer_id = in.readInt();
}

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

public VKAttachments(Parcel parcel) {
    int size = parcel.readInt();
    for (int i = 0; i < size; i++) {
        String type = parcel.readString();
        if (TYPE_PHOTO.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiPhoto.class.getClassLoader()));
        } else if (TYPE_VIDEO.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiVideo.class.getClassLoader()));
        } else if (TYPE_AUDIO.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiAudio.class.getClassLoader()));
        } else if (TYPE_DOC.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiDocument.class.getClassLoader()));
        } else if (TYPE_POST.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiPost.class.getClassLoader()));
        } else if (TYPE_POSTED_PHOTO.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiPostedPhoto.class.getClassLoader()));
        } else if (TYPE_LINK.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiLink.class.getClassLoader()));
        } else if (TYPE_NOTE.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiNote.class.getClassLoader()));
        } else if (TYPE_APP.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiApplicationContent.class.getClassLoader()));
        } else if (TYPE_POLL.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiPoll.class.getClassLoader()));
        } else if (TYPE_WIKI_PAGE.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiWikiPage.class.getClassLoader()));
        } else if (TYPE_ALBUM.equals(type)) {
            add((VKApiAttachment) parcel.readParcelable(VKApiPhotoAlbum.class.getClassLoader()));
        }// w w w  . j  a v a2  s.c  om
    }
}

From source file:br.ufrj.ppgi.jemf.mobile.bean.Victim.java

/**
 * Victim Parcelable Constructor.//from   w ww  . j  a  v a 2  s  .  c o m
 * Parcelable to get passed among activities through Intent (similar to Serialization).
 * Attention to class members order an this use FIFO method.
 */
private Victim(Parcel in) {
    setId(in.readInt());
    setName(in.readString());
    setGender(in.readInt());
    setBirthDateString(in.readString());
    setAge(in.readInt());
    setStatusString(in.readString());
}

From source file:de.azapps.mirakel.settings.custom_views.Settings.java

private Settings(final Parcel in) {
    this.titleResId = in.readInt();
    this.iconResId = OptionalUtils.readFromParcel(in, Integer.class);
}

From source file:com.eTilbudsavis.etasdk.model.Typeahead.java

private Typeahead(Parcel in) {
    this.mLength = in.readInt();
    this.mOffset = in.readInt();
    this.mSubject = in.readString();
}

From source file:com.simas.vc.nav_drawer.NavCAB.java

@SuppressWarnings("unchecked")
private NavCAB(Parcel in) {
    mInitiallySelectedPosition = in.readInt();
    checkedPositions = (List<Integer>) in.readSerializable();
}

From source file:br.ufrj.ppgi.jemf.mobile.bean.Task.java

/**
 * Task Parcelable Constructor.//w  ww. ja v a 2s.c  om
 * Parcelable to get passed among activities through Intent (similar to Serialization).
 * Attention to class members order an this use FIFO method.
 */
private Task(Parcel in) {
    setId(in.readInt());
    setTitle(in.readString());
    setDescription(in.readString());
    setStatusString(in.readString());
    setStartDateString(in.readString());
    setEndDateString(in.readString());
    setPriorityString(in.readString());
}

From source file:com.artemchep.horario.models.Teacher.java

public Teacher(Parcel source) {
    key = source.readString();//from  w ww . j a v  a2 s.  c  o m
    name = source.readString();
    email = source.readString();
    phone = source.readString();
    info = source.readString();
    color = source.readInt();
}

From source file:com.artemchep.horario.models.Exam.java

public Exam(Parcel source) {
    key = source.readString();/*from  w  w  w. j  a  v  a 2 s.c o m*/
    place = source.readString();
    subject = source.readString();
    teacher = source.readString();
    info = source.readString();
    date = source.readInt();
    time = source.readInt();
}