# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Constants | Inherited Constants | Fields | Methods | Inherited Methods

# Tile

`public final class Tile`
`extends Object` `implements Parcelable`

java.lang.Object
↳ | android.service.quicksettings.Tile

A Tile holds the state of a tile that will be displayed in Quick Settings. A tile in Quick Settings exists as an icon with an accompanied label. It also may have content description for accessibility usability. The style and layout of the tile may change to match a given device.

## Summary

### Constants
`int` | `STATE_ACTIVE` This represents a tile that is currently active.
`int` | `STATE_INACTIVE` This represents a tile that is currently in a disabled state but is still interactable.
`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.

### Inherited constants
From interface `android.os.Parcelable`
`int` | `CONTENTS_FILE_DESCRIPTOR` Descriptor bit used with `describeContents()`: indicates that the Parcelable object's flattened representation includes a file descriptor.
`int` | `PARCELABLE_WRITE_RETURN_VALUE` Flag for use with `writeToParcel(Parcel, int)`: the object being written is a return value, that is the result of a function such as "`Parcelable someFunction()`", "`void someFunction(out Parcelable)`", or "`void someFunction(inout Parcelable)`".

### Fields
`public static final Creator<Tile>` | `CREATOR`

### Public methods
`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.
`CharSequence` | `getStateDescription()` Gets the current state description for the tile.
`CharSequence` | `getSubtitle()` Gets the current subtitle for 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` | `setState(int state)` Sets the current state for the tile.
`void` | `setStateDescription(CharSequence stateDescription)` Sets the current state description for the tile.
`void` | `setSubtitle(CharSequence subtitle)` Set the subtitle 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.

### Inherited methods
From class `java.lang.Object`
`Object` | `clone()` Creates and returns a copy of this object.
`boolean` | `equals(Object obj)` Indicates whether some other object is "equal to" this one.
`void` | `finalize()` Called by the garbage collector on an object when garbage collection determines that there are no more references to the object.
`final Class<?>` | `getClass()` Returns the runtime class of this `Object`.
`int` | `hashCode()` Returns a hash code value for the object.
`final void` | `notify()` Wakes up a single thread that is waiting on this object's monitor.
`final void` | `notifyAll()` Wakes up all threads that are waiting on this object's monitor.
`String` | `toString()` Returns a string representation of the object.
`final void` | `wait(long timeout, int nanos)` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object, or some other thread interrupts the current thread, or a certain amount of real time has elapsed.
`final void` | `wait(long timeout)` Causes the current thread to wait until either another thread invokes the `notify()` method or the `notifyAll()` method for this object, or a specified amount of time has elapsed.
`final void` | `wait()` Causes the current thread to wait until another thread invokes the `notify()` method or the `notifyAll()` method for this object.
From interface `android.os.Parcelable`
`abstract int` | `describeContents()` Describe the kinds of special objects contained in this Parcelable instance's marshaled representation.
`abstract void` | `writeToParcel(Parcel dest, int flags)` Flatten this object in to a Parcel.

## Constants

### STATE_ACTIVE

    public static final int STATE_ACTIVE

This represents a tile that is currently active. (e.g. wifi is connected, bluetooth is on, cast is casting). This is the default state.

Constant Value: 2 (0x00000002)

### STATE_INACTIVE

    public static final int STATE_INACTIVE

This represents a tile that is currently in a disabled state but is still interactable. A disabled state indicates that the tile is not currently active (e.g. wifi disconnected or bluetooth disabled), but is still interactable by the user to modify this state. Tiles that have boolean states should use this to represent one of their states. The tile's icon will be tinted differently to reflect this state, but still be distinct from unavailable.

Constant Value: 1 (0x00000001)

### STATE_UNAVAILABLE

    public static final 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. The tile's icon will be tinted differently to reflect this state.

Constant Value: 0 (0x00000000)

## Fields

### CREATOR

    public static final Creator<Tile> CREATOR

## Public methods

### describeContents

    public int describeContents ()

Describe the kinds of special objects contained in this Parcelable instance's marshaled representation. For example, if the object will include a file descriptor in the output of `writeToParcel(android.os.Parcel, int)`, the return value of this method must include the `CONTENTS_FILE_DESCRIPTOR` bit.

Returns
`int` | a bitmask indicating the set of special object types marshaled by this Parcelable object instance. Value is either `0` or `CONTENTS_FILE_DESCRIPTOR`

### getContentDescription

    public CharSequence getContentDescription ()

Gets the current content description for the tile.

Returns
`CharSequence` |

### getIcon

    public Icon getIcon ()

Gets the current icon for the tile.

Returns
`Icon` |

### getLabel

    public CharSequence getLabel ()

Gets the current label for the tile.

Returns
`CharSequence` |

### getState

    public int getState ()

The current state of the tile.

Returns
`int` |

See also:

- `STATE_UNAVAILABLE`
- `STATE_INACTIVE`
- `STATE_ACTIVE`

### getStateDescription

    public CharSequence getStateDescription ()

Gets the current state description for the tile.

Returns
`CharSequence` | This value may be `null`.

### getSubtitle

    public CharSequence getSubtitle ()

Gets the current subtitle for the tile.

Returns
`CharSequence` | This value may be `null`.

### setContentDescription

    public void setContentDescription (CharSequence contentDescription)

Sets the current content description for the tile. Does not take effect until `updateTile()` is called.

Parameters
`contentDescription` | `CharSequence`: New content description to use.

### setIcon

    public void setIcon (Icon icon)

Sets the current icon for the tile. This icon is expected to be white on alpha, and may be tinted by the system to match it's theme. Does not take effect until `updateTile()` is called.

Parameters
`icon` | `Icon`: New icon to show.

### setLabel

    public void setLabel (CharSequence label)

Sets the current label for the tile. Does not take effect until `updateTile()` is called.

Parameters
`label` | `CharSequence`: New label to show.

### setState

    public void setState (int state)

Sets the current state for the tile. Does not take effect until `updateTile()` is called.

Parameters
`state` | `int`: One of `STATE_UNAVAILABLE`, `STATE_INACTIVE`, `STATE_ACTIVE`

### setStateDescription

    public void setStateDescription (CharSequence stateDescription)

Sets the current state description for the tile. Does not take effect until `updateTile()` is called.

Parameters
`stateDescription` | `CharSequence`: New state description to use. This value may be `null`.

### setSubtitle

    public void setSubtitle (CharSequence subtitle)

Set the subtitle for the tile. Will be displayed as the secondary label.

Parameters
`subtitle` | `CharSequence`: the subtitle to show. This value may be `null`.

### updateTile

    public void updateTile ()

Pushes the state of the Tile to Quick Settings to be displayed.

### writeToParcel

    public void writeToParcel (Parcel dest,
                    int flags)

Flatten this object in to a Parcel.

Parameters
`dest` | `Parcel`: The Parcel in which the object should be written.
`flags` | `int`: Additional flags about how the object should be written. May be 0 or `Parcelable.PARCELABLE_WRITE_RETURN_VALUE`. Value is either `0` or a combination of `Parcelable.PARCELABLE_WRITE_RETURN_VALUE`, and android.os.Parcelable.PARCELABLE_ELIDE_DUPLICATES

Full name *
Email address *
Company / developer name
One of your Play Store app URLs *
Which best describes your business:*
Apps
Games
Apps & Games
*
*