Parcel writeString - top ranked examples from Open Source projects

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

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: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) { 
8
CodeRank
This code example shows how to use the following methods:writeInt, writeParcelable, writeString, writeTypedList, writeToParcel
This code example shows how to use the following methods:writeInt, writeLong, writeString
    return 0; 
  } 
 
  @Override 
  public void writeToParcel(Parcel dest, int flags) {
    dest.writeInt(relayPort);
    dest.writeLong(sessionId);
    dest.writeString(serverName);
  } 
 
  public static final Parcelable.Creator<SessionDescriptor> CREATOR =
    new Parcelable.Creator<SessionDescriptor>() 
  { 
    public SessionDescriptor createFromParcel(Parcel in) { 
      return new SessionDescriptor(in); 
    } 
 
    public SessionDescriptor[] newArray(int size) { 
      return new SessionDescriptor[size]; 
    } 
8
CodeRank
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
This code example shows how to use the following methods:writeLong, writeString
    /** 
     * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int) 
     */ 
    @Override 
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(id);
        dest.writeLong(transactionId);
    } 
 
    /** 
     * Saves data to parcel. 
     *  
     * @param source 
     *            Parcel to save to. 
     * @throws IOException 
     */ 
    public void readFromParcel(Parcel source) throws IOException {
        id = source.readString();
        transactionId = source.readLong();
    } 
8
CodeRank
This code example shows how to use the following methods:writeString
            super(superState);
        } 
 
        @Override 
        public void writeToParcel(Parcel dest, int flags) {
            super.writeToParcel(dest, flags);
            dest.writeString(text);
        } 
    } 
 
    private EditText mEditText;
    private String mText;
 
    public EditTextPreference(Context context) {
        this(context, null);
    } 
 
    public EditTextPreference(Context context, AttributeSet attrs) {
        this(context, attrs, R.attr.editTextPreferenceStyle);
    } 
8
CodeRank
This code example shows how to use the following methods:writeInt, writeLong, writeParcelable, writeString
 
        /** 
         * Helper for making subclasses parcelable. 
         */ 
        protected void writeToParcel(Parcel p) {
            p.writeInt(type);
            p.writeString(label);
            p.writeString(data);
            p.writeParcelable(uri, 0);
            p.writeLong(id);
            p.writeInt(maxLines);
            p.writeString(mimetype);
        } 
 
        /** 
         * Helper for making subclasses parcelable. 
         */ 
        protected void readFromParcel(Parcel p) {
            final ClassLoader loader = getClass().getClassLoader();
            type = p.readInt();
7
CodeRank
This code example shows how to use the following methods:writeInt, writeParcelable, writeString
	 *  
	 * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int) 
	 */ 
	@Override 
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(type);
		dest.writeString(name);
		dest.writeString(uid);
		dest.writeInt(status);
		dest.writeInt(notificationsEnabled ? 1 : 0);
		dest.writeParcelable(user, flags);
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see java.lang.Object#toString() 
	 */ 
	@Override 
7
CodeRank
This code example shows how to use the following methods:writeInt, writeParcelable, writeString
	 *  
	 * @see android.os.Parcelable#writeToParcel(android.os.Parcel, int) 
	 */ 
	@Override 
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeString(id);
		dest.writeString(comment);
		dest.writeInt(status);
		dest.writeString(createdAt);
		dest.writeParcelable(user, flags);
	} 
 
	public static final Parcelable.Creator<GCCommentModel> CREATOR = new Parcelable.Creator<GCCommentModel>() {
 
		@Override 
		public GCCommentModel createFromParcel(Parcel in) { 
			return new GCCommentModel(in); 
		} 
 
		@Override 
7
CodeRank

Related Parcel writeString Questions & Answers:

writeString Method Overview
Write a string value into the parcel at the current dataPosition(), growing dataCapacity() if needed.
See Code Examples for other Android Parcel Methods: