Best code examples for Android Parcel class (android.os.Parcel)

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Android Parcel class.
You can now enable Codota on your own code to easily search and navigate your Java codebase.

Android Parcel examples from Open Source projects
This code example shows how to use the following methods: writeInt, writeIntArray, writeLong, writeString, writeStringList
8
CodeRank
This code example shows how to use the following methods: writeBundle, writeInt
            super(superState);
        } 
 
        @Override 
        public void writeToParcel(Parcel dest, int flags) {
            super.writeToParcel(dest, flags);
            dest.writeInt(isDialogShowing ? 1 : 0);
            dest.writeBundle(dialogBundle);
        } 
    } 
 
    private AlertDialog.Builder mBuilder;
    private Dialog mDialog;
    private Context mDialogContext;
    private Drawable mDialogIcon;
    private int mDialogLayoutResId;
    private CharSequence mDialogMessage;
    private CharSequence mDialogTitle;
    private InputMethodManager mInputMethodManager;
 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: readDouble, readInt, readLong, readString
 
    public Phone() {} 
 
    // Parcelable management 
    private Phone(Parcel in) {
        serverId = in.readLong();
        name = in.readString();
        manufacturer = in.readString();
        androidVersion = in.readString();
        screenSize = in.readDouble();
        price = in.readInt();
    } 
 
    public int describeContents() { 
        return 0; 
    } 
 
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(serverId);
        dest.writeString(name);
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: writeDouble, writeInt, writeLong, writeString
    public int describeContents() { 
        return 0; 
    } 
 
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeLong(serverId);
        dest.writeString(name);
        dest.writeString(manufacturer);
        dest.writeString(androidVersion);
        dest.writeDouble(screenSize);
        dest.writeInt(price);
 
    } 
 
    public static final Parcelable.Creator<Phone> CREATOR = new Parcelable.Creator<Phone>() {
        public Phone createFromParcel(Parcel in) { 
            return new Phone(in); 
        } 
 
        public Phone[] newArray(int size) { 
Full Snippet Info
8
CodeRank
This code example shows how to use the following methods: createStringArrayList, readInt, readLong, readParcelable, readString
    public static final Parcelable.Creator<VpnConfig> CREATOR =
            new Parcelable.Creator<VpnConfig>() { 
        @Override 
        public VpnConfig createFromParcel(Parcel in) { 
            VpnConfig config = new VpnConfig(); 
            config.user = in.readString(); 
            config.interfaze = in.readString(); 
            config.session = in.readString(); 
            config.mtu = in.readInt(); 
            config.addresses = in.readString(); 
            config.routes = in.readString(); 
            config.dnsServers = in.createStringArrayList(); 
            config.searchDomains = in.createStringArrayList(); 
            config.configureIntent = in.readParcelable(null); 
            config.startTime = in.readLong(); 
            return config; 
        } 
 
        @Override 
        public VpnConfig[] newArray(int size) { 
Full Snippet Info
8
CodeRank
Related Android Parcel Questions & Answers:
See Code Examples for Android Parcel Methods: