Created
February 29, 2016 21:12
-
-
Save abbas-oveissi/6ea6e8f04d763ced2a26 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ImageHolder implements Parcelable { | |
public String name=""; | |
@Override | |
public int describeContents() { | |
return 0; | |
} | |
@Override | |
public void writeToParcel(Parcel dest, int flags) { | |
dest.writeString(this.name); | |
} | |
public ImageHolder() { | |
} | |
protected ImageHolder(Parcel in) { | |
this.name = in.readString(); | |
} | |
public static final Parcelable.Creator<ImageHolder> CREATOR = new Parcelable.Creator<ImageHolder>() { | |
public ImageHolder createFromParcel(Parcel source) { | |
return new ImageHolder(source); | |
} | |
public ImageHolder[] newArray(int size) { | |
return new ImageHolder[size]; | |
} | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ImageHolder im=new ImageHolder(); | |
im.name="abbas"; | |
Intent i = new Intent(this, TestActivity.class); | |
startActivity(i); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment