Parcelable writeToParcel - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Parcelable writeToParcel method.

This code example shows how to use the following methods:writeInt, writeIntArray, writeLong, writeString, writeStringList
8
CodeRank
Experience pair programming with AI  Get Codota for Java
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;
 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
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);
8
CodeRank
Experience pair programming with AI  Get Codota for Java
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) { 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:writeInt, writeParcelable, writeString, writeTypedList, writeToParcel
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:readInt, readLong, readString
    this.relayPort  = relayPort;
    this.sessionId  = sessionId;
  } 
 
  public SessionDescriptor(Parcel in) {
    this.relayPort  = in.readInt();
    this.sessionId  = in.readLong();
    this.serverName = in.readString();
  } 
 
  public String getFullServerName() {
    return serverName + Release.SERVER_ROOT;
  } 
 
  @Override 
  public boolean equals(Object other) {
    if (other == null)                         return false;
    if (!(other instanceof SessionDescriptor)) return false;
 
    SessionDescriptor that = (SessionDescriptor)other;
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:readParcelable, readString
        dest.writeParcelable(valuesForNewTasks, 0);
    } 
 
    @Override 
    public void readFromParcel(Parcel source) {
        super.readFromParcel(source);
        title = source.readString();
        sqlQuery = source.readString();
        valuesForNewTasks = source.readParcelable(ContentValues.class.getClassLoader());
    } 
 
    /** 
     * Parcelable Creator Object 
     */ 
    public static final Parcelable.Creator<Filter> CREATOR = new Parcelable.Creator<Filter>() {
 
        /** 
         * {@inheritDoc} 
         */ 
        public Filter createFromParcel(Parcel source) { 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:writeParcelable, writeString
    /** 
     * {@inheritDoc} 
     */ 
    @Override 
    public void writeToParcel(Parcel dest, int flags) {
        super.writeToParcel(dest, flags);
        dest.writeString(title);
        dest.writeString(sqlQuery);
        dest.writeParcelable(valuesForNewTasks, 0);
    } 
 
    @Override 
    public void readFromParcel(Parcel source) {
        super.readFromParcel(source);
        title = source.readString();
        sqlQuery = source.readString();
        valuesForNewTasks = source.readParcelable(ContentValues.class.getClassLoader());
    } 
 
    /** 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:readLong, readString
     * @param source 
     *            Parcel to save to. 
     * @throws IOException 
     */ 
    public void readFromParcel(Parcel source) throws IOException {
        id = source.readString();
        transactionId = source.readLong();
    } 
 
} 
8
CodeRank
Experience pair programming with AI  Get Codota for Java
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);
8
CodeRank
Experience pair programming with AI  Get Codota for Java

Related Parcelable writeToParcel Questions & Answers:

writeToParcel Method Overview
Flatten this object in to a Parcel.
See Code Examples for other Android Parcelable Methods: