Parcable Object and Service

Put your problem here if it does not fit any of the other categories.

Parcable Object and Service

Postby Eagle Eye » Tue Jun 22, 2010 11:09 am

Code: Select all
public final class Rect implements Parcelable {
    public int left;
    public int top;
    public int right;
    public int bottom;

    public static final Parcelable.Creator<Rect> CREATOR = new Parcelable.Creator<Rect>() {
        public Rect createFromParcel(Parcel in) {
            return new Rect(in);
        }

        public Rect[] newArray(int size) {
            return new Rect[size];
        }
    };

    public Rect() {
    }

    private Rect(Parcel in) {
        readFromParcel(in);
    }

    public void writeToParcel(Parcel out) {
        out.writeInt(left);
        out.writeInt(top);
        out.writeInt(right);
        out.writeInt(bottom);
    }

    public void readFromParcel(Parcel in) {
        left = in.readInt();
        top = in.readInt();
        right = in.readInt();
        bottom = in.readInt();
    }
}


HOW TO: using serwice write to parcable object?
Eagle Eye
Junior Developer
Junior Developer
 
Posts: 14
Joined: Sun May 23, 2010 6:38 am

Top

Re: Parcable Object and Service

Postby nicholas.hauschild » Wed Jun 23, 2010 2:22 am

I don't understand the question... You want to write a parcelable from a service? I am not even sure that is a complete question...

Please provide a little bit more information about what you are trying to do.
nicholas.hauschild
Master Developer
Master Developer
 
Posts: 310
Joined: Fri Dec 04, 2009 4:50 am

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 16 guests