Parcel readParcelable - 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 readParcelable method.

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
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
This code example shows how to use the following methods:createTypedArrayList, readInt, readParcelable, readString
8
CodeRank
This code example shows how to use the following methods:readInt, readLong, readParcelable, readString
        /** 
         * Helper for making subclasses parcelable. 
         */ 
        protected void readFromParcel(Parcel p) {
            final ClassLoader loader = getClass().getClassLoader();
            type = p.readInt();
            label = p.readString();
            data = p.readString();
            uri = p.readParcelable(loader);
            id = p.readLong();
            maxLines = p.readInt();
            mimetype = p.readString();
        } 
    } 
 
    ContactEntryAdapter(Context context, ArrayList<ArrayList<E>> sections, boolean separators) {
        mContext = context;
        mInflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
        mSections = sections;
        mSeparators = separators;
7
CodeRank
This code example shows how to use the following methods:readInt, readParcelable, readString
	public void setUser(GCUserModel user) {
		this.user = user;
	} 
 
	public GCAccountModel(Parcel in) {
		id = in.readString();
		type = in.readString();
		name = in.readString();
		uid = in.readString();
		status = in.readInt();
		notificationsEnabled = in.readInt() == 1;
		user = in.readParcelable(GCUserModel.class.getClassLoader());
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see android.os.Parcelable#describeContents() 
	 */ 
	@Override 
7
CodeRank
This code example shows how to use the following methods:readByteArray, readDouble, readInt, readLong, readParcelable
	ACtxHistoryAttribute(final ACtxAttributeIdentifier attrId, 
			final Date lastModified, final Date lastUpdated,
			final String stringValue, final Integer integerValue,
			final Double doubleValue, final byte[] binaryValue,
			final CtxAttributeValueType valueType, final String valueMetric) {
		 
		super(attrId);
		super.setLastModified(lastModified);
		this.lastUpdated = lastUpdated;
		this.stringValue = stringValue;
		this.integerValue = integerValue;
		this.doubleValue = doubleValue;
		this.binaryValue = binaryValue;
		this.valueType = valueType;
		this.valueMetric = valueMetric;
	} 
	 
	/** 
	 * Making class Parcelable 
	 */ 

7
CodeRank
This code example shows how to use the following methods:readInt, readParcelable, readString
		this.createdAt = createdAt;
		this.user = user;
	} 
 
	public GCCommentModel(Parcel in) {
		id = in.readString();
		comment = in.readString();
		status = in.readInt();
		createdAt = in.readString();
		user = in.readParcelable(GCUserModel.class.getClassLoader());
	} 
 
	/* 
	 * (non-Javadoc) 
	 *  
	 * @see android.os.Parcelable#describeContents() 
	 */ 
	@Override 
	public int describeContents() { 
		return 0; 
7
CodeRank
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
This code example shows how to use the following methods:readInt, readParcelable
    public static final Parcelable.Creator<TaskDecoration> CREATOR = new Parcelable.Creator<TaskDecoration>() {
        /** 
         * {@inheritDoc} 
         */ 
        public TaskDecoration createFromParcel(Parcel source) { 
            return new TaskDecoration((RemoteViews)source.readParcelable( 
                    RemoteViews.class.getClassLoader()), 
                    source.readInt(), source.readInt()); 
        } 
 
        /** 
         * {@inheritDoc} 
         */ 
        public TaskDecoration[] newArray(int size) { 
            return new TaskDecoration[size]; 
        }; 
    }; 
 
} 
7
CodeRank
This code example shows how to use the following methods:readInt, readParcelable, readString
        helpAvailable = false;
        duration = null;
    } 
 
    private Input(Parcel in) {
        text = in.readString();
        defaultText = in.readString();
        icon = in.readParcelable(null);
        minLen = in.readInt();
        maxLen = in.readInt();
        ucs2 = in.readInt() == 1 ? true : false;
        packed = in.readInt() == 1 ? true : false;
        digitOnly = in.readInt() == 1 ? true : false;
        echo = in.readInt() == 1 ? true : false;
        yesNo = in.readInt() == 1 ? true : false;
        helpAvailable = in.readInt() == 1 ? true : false;
        duration = in.readParcelable(null);
    } 
 
    public int describeContents() { 

7
CodeRank

Related Parcel readParcelable Questions & Answers:

readParcelable Method Overview
Read and return a new Parcelable from the parcel.
See Code Examples for other Android Parcel Methods: