Java android.graphics.drawable StateListDrawable fields, constructors, methods, implement or subclass

Example usage for Java android.graphics.drawable StateListDrawable fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for android.graphics.drawable StateListDrawable.

The text is from its open source code.

Constructor

Method

voidaddState(int[] stateSet, Drawable drawable)
Add a new image/string ID to the set of images.
ConstantStategetConstantState()
DrawablegetCurrent()
intgetIntrinsicWidth()
booleangetPadding(Rect padding)
DrawablegetStateDrawable(int index)
Gets the drawable at an index.
intgetStateDrawableIndex(int[] stateSet)
Gets the index of the drawable with the provided state set.
voidsetAlpha(int alpha)
voidsetColorFilter(@ColorInt int color, @NonNull PorterDuff.Mode mode)
Specify a color and Porter-Duff mode to be the color filter for this drawable.
voidsetColorFilter(ColorFilter colorFilter)
voidsetEnterFadeDuration(int ms)
Change the global fade duration when a new drawable is entering the scene.
voidsetExitFadeDuration(int ms)
Change the global fade duration when a new drawable is leaving the scene.
booleansetState(@NonNull final int[] stateSet)
Specify a set of states for the drawable.