public final class Tile extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Tile> |
CREATOR |
static int |
STATE_ACTIVE
This represents a tile that is currently active.
|
static int |
STATE_INACTIVE
This represents a tile that is currently in a disabled state but is still interactable.
|
static int |
STATE_UNAVAILABLE
An unavailable state indicates that for some reason this tile is not currently
available to the user for some reason, and will have no click action.
|
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_ELIDE_DUPLICATES, PARCELABLE_WRITE_RETURN_VALUE
Modifier and Type | Method and Description |
---|---|
int |
describeContents()
Describe the kinds of special objects contained in this Parcelable
instance's marshaled representation.
|
CharSequence |
getContentDescription()
Gets the current content description for the tile.
|
Icon |
getIcon()
Gets the current icon for the tile.
|
CharSequence |
getLabel()
Gets the current label for the tile.
|
int |
getState()
The current state of the tile.
|
void |
setContentDescription(CharSequence contentDescription)
Sets the current content description for the tile.
|
void |
setIcon(Icon icon)
Sets the current icon for the tile.
|
void |
setLabel(CharSequence label)
Sets the current label for the tile.
|
void |
setService(IQSService service,
IBinder stub) |
void |
setState(int state)
Sets the current state for the tile.
|
void |
updateTile()
Pushes the state of the Tile to Quick Settings to be displayed.
|
void |
writeToParcel(Parcel dest,
int flags)
Flatten this object in to a Parcel.
|
public static final int STATE_UNAVAILABLE
public static final int STATE_INACTIVE
public static final int STATE_ACTIVE
public static final Parcelable.Creator<Tile> CREATOR
public Tile(Parcel source)
public Tile()
public void setService(IQSService service, IBinder stub)
public int getState()
STATE_UNAVAILABLE
,
STATE_INACTIVE
,
STATE_ACTIVE
public void setState(int state)
updateTile()
is called.state
- One of STATE_UNAVAILABLE
, STATE_INACTIVE
,
STATE_ACTIVE
public Icon getIcon()
public void setIcon(Icon icon)
updateTile()
is called.icon
- New icon to show.public CharSequence getLabel()
public void setLabel(CharSequence label)
updateTile()
is called.label
- New label to show.public CharSequence getContentDescription()
public void setContentDescription(CharSequence contentDescription)
updateTile()
is called.contentDescription
- New content description to use.public int describeContents()
Parcelable
Parcelable.writeToParcel(Parcel, int)
,
the return value of this method must include the
Parcelable.CONTENTS_FILE_DESCRIPTOR
bit.describeContents
in interface Parcelable
Parcelable.CONTENTS_FILE_DESCRIPTOR
public void updateTile()
public void writeToParcel(Parcel dest, int flags)
Parcelable
writeToParcel
in interface Parcelable
dest
- The Parcel in which the object should be written.flags
- Additional flags about how the object should be written.
May be 0 or Parcelable.PARCELABLE_WRITE_RETURN_VALUE
.