CompositeDrawable
public class CompositeDrawable extends Drawable implements Drawable.Callback
| java.lang.Object | ||
| ↳ | android.graphics.drawable.Drawable | |
| ↳ | androidx.leanback.graphics.CompositeDrawable |
Generic drawable class that can be composed of multiple children. Whenever the bounds changes for this class, it updates those of its children.
Summary
Nested types |
|---|
public final class CompositeDrawable.ChildDrawableWrapper class holding a drawable object and |
Public constructors |
|---|
Public methods |
|
|---|---|
void |
addChildDrawable(@NonNull Drawable drawable)Adds the supplied region. |
void |
|
int |
getAlpha() |
@NonNull CompositeDrawable.ChildDrawable |
getChildAt(int index)Returns the |
int |
Returns the total number of children. |
@NonNull Drawable.ConstantState |
|
@NonNull Drawable |
getDrawable(int index)Returns the |
int |
This method is deprecated. |
void |
|
@NonNull Drawable |
mutate() |
void |
removeChild(int index)Removes the child corresponding to the given index. |
void |
removeDrawable(@NonNull Drawable drawable)Removes the given region. |
void |
scheduleDrawable(@NonNull Drawable who, @NonNull Runnable what, long when) |
void |
setAlpha(int alpha) |
void |
setChildDrawableAt(int index, @NonNull Drawable drawable)Sets the supplied region at given index. |
void |
setColorFilter(@Nullable ColorFilter colorFilter) |
void |
unscheduleDrawable(@NonNull Drawable who, @NonNull Runnable what) |
Protected methods |
|
|---|---|
void |
onBoundsChange(Rect bounds) |
Inherited methods |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
Public methods
addChildDrawable
public void addChildDrawable(@NonNull Drawable drawable)
Adds the supplied region.
getChildAt
public @NonNull CompositeDrawable.ChildDrawable getChildAt(int index)
Returns the ChildDrawable at the given index.
getDrawable
public @NonNull Drawable getDrawable(int index)
Returns the Drawable for the given index.
removeChild
public void removeChild(int index)
Removes the child corresponding to the given index.
removeDrawable
public void removeDrawable(@NonNull Drawable drawable)
Removes the given region.
scheduleDrawable
public void scheduleDrawable(@NonNull Drawable who, @NonNull Runnable what, long when)
setChildDrawableAt
public void setChildDrawableAt(int index, @NonNull Drawable drawable)
Sets the supplied region at given index.