public class TokenModel extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<TokenModel> |
CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Constructor and Description |
---|
TokenModel(String text,
Drawable image)
Creates a TokenModel object with image, text and reference to the object which represents.
|
Modifier and Type | Method and Description |
---|---|
int |
describeContents() |
Drawable |
getImage()
Returns image displayed in token.
|
String |
getNsImageName()
Returns the name of the image resource (if it has been set).
|
String |
getText()
Returns text displayed in token.
|
void |
setImage(Drawable image)
Sets image displayed in token.
|
void |
setNsImageName(String name)
Sets the name of the image resource.
|
void |
setText(String text)
Sets text displayed in token.
|
String |
toString() |
void |
writeToParcel(Parcel dest,
int flags) |
public static final Parcelable.Creator<TokenModel> CREATOR
public void setNsImageName(String name)
name
- the name.public String getNsImageName()
public String getText()
public void setText(String text)
text
- displayed text.public Drawable getImage()
public void setImage(Drawable image)
image
- an image to be displayed.public int describeContents()
describeContents
in interface Parcelable
public void writeToParcel(Parcel dest, int flags)
writeToParcel
in interface Parcelable