# Print output for @column tags ?>
Developers

- Design
- Develop
- Distribute

Developer Console

## Most visited

## Recently visited

## Results for

Summary: Ctors | Methods | Inherited Methods

# Drawable.ConstantState

`public static abstract class Drawable.ConstantState`
`extends Object` ``

java.lang.Object
↳ | android.graphics.drawable.Drawable.ConstantState

Known direct subclasses DrawableContainer.DrawableContainerState
DrawableContainer.DrawableContainerState | A ConstantState that can contain several `Drawable`s.

This abstract class is used by `Drawable`s to store shared constant state and data between Drawables. `BitmapDrawable`s created from the same resource will for instance share a unique bitmap stored in their ConstantState.

`newDrawable(android.content.res.Resources)` can be used as a factory to create new Drawable instances from this ConstantState.

Use `Drawable#getConstantState()` to retrieve the ConstantState of a Drawable. Calling `Drawable#mutate()` on a Drawable should typically create a new ConstantState for that Drawable.

## Summary

### Public constructors
`ConstantState()`

### Public methods
`boolean` | `canApplyTheme()` Return whether this constant state can have a theme applied.
`abstract int` | `getChangingConfigurations()` Return a bit mask of configuration changes that will impact this drawable (and thus require completely reloading it).
`Drawable` | `newDrawable(Resources res)` Creates a new Drawable instance from its constant state using the specified resources.
`abstract Drawable` | `newDrawable()` Creates a new Drawable instance from its constant state.
`Drawable` | `newDrawable(Resources res, Resources.Theme theme)` Creates a new Drawable instance from its constant state using the specified resources and theme.

### 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.

## Public constructors

### ConstantState

    public ConstantState ()

## Public methods

### canApplyTheme

    public boolean canApplyTheme ()

Return whether this constant state can have a theme applied.

Returns
`boolean` |

### getChangingConfigurations

    public abstract int getChangingConfigurations ()

Return a bit mask of configuration changes that will impact this drawable (and thus require completely reloading it).

Returns
`int` | Value is either `0` or a combination of `ActivityInfo.CONFIG_MCC`, `ActivityInfo.CONFIG_MNC`, `ActivityInfo.CONFIG_LOCALE`, `ActivityInfo.CONFIG_TOUCHSCREEN`, `ActivityInfo.CONFIG_KEYBOARD`, `ActivityInfo.CONFIG_KEYBOARD_HIDDEN`, `ActivityInfo.CONFIG_NAVIGATION`, `ActivityInfo.CONFIG_ORIENTATION`, `ActivityInfo.CONFIG_SCREEN_LAYOUT`, `ActivityInfo.CONFIG_UI_MODE`, `ActivityInfo.CONFIG_SCREEN_SIZE`, `ActivityInfo.CONFIG_SMALLEST_SCREEN_SIZE`, `ActivityInfo.CONFIG_DENSITY`, `ActivityInfo.CONFIG_LAYOUT_DIRECTION`, `ActivityInfo.CONFIG_COLOR_MODE`, and `ActivityInfo.CONFIG_FONT_SCALE`

### newDrawable

    public Drawable newDrawable (Resources res)

Creates a new Drawable instance from its constant state using the specified resources. This method should be implemented for drawables that have density-dependent properties.

The default implementation for this method calls through to `newDrawable()`.

Parameters
`res` | `Resources`: the resources of the context in which the drawable will be displayed This value may be `null`.

Returns
`Drawable` | a new drawable object based on this constant state This value cannot be `null`.

### newDrawable

    public abstract Drawable newDrawable ()

Creates a new Drawable instance from its constant state.

Note: Using this method means density-dependent properties, such as pixel dimensions or bitmap images, will not be updated to match the density of the target display. To ensure correct scaling, use `newDrawable(android.content.res.Resources)` instead to provide an appropriate Resources object.

Returns
`Drawable` | a new drawable object based on this constant state This value cannot be `null`.

See also:

- `newDrawable(Resources)`

### newDrawable

    public Drawable newDrawable (Resources res,
                    Resources.Theme theme)

Creates a new Drawable instance from its constant state using the specified resources and theme. This method should be implemented for drawables that have theme-dependent properties.

The default implementation for this method calls through to `newDrawable(android.content.res.Resources)`.

Parameters
`res` | `Resources`: the resources of the context in which the drawable will be displayed This value may be `null`.
`theme` | `Resources.Theme`: the theme of the context in which the drawable will be displayed This value may be `null`.

Returns
`Drawable` | a new drawable object based on this constant state This value cannot be `null`.

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