belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
CompositeDrawable
public
class
CompositeDrawable
extends Drawable
implements
Drawable.Callback
java.lang.Object | ||
↳ | android.graphics.drawable.Drawable | |
↳ | android.support.v17.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 classes | |
---|---|
class |
CompositeDrawable.ChildDrawable
Wrapper class holding a drawable object and |
Public constructors | |
---|---|
CompositeDrawable()
|
Public methods | |
---|---|
void
|
addChildDrawable(Drawable drawable)
Adds the supplied region. |
void
|
draw(Canvas canvas)
|
int
|
getAlpha()
|
CompositeDrawable.ChildDrawable
|
getChildAt(int index)
Returns the |
int
|
getChildCount()
Returns the total number of children. |
Drawable.ConstantState
|
getConstantState()
|
Drawable
|
getDrawable(int index)
Returns the |
int
|
getOpacity()
|
void
|
invalidateDrawable(Drawable who)
|
Drawable
|
mutate()
|
void
|
removeChild(int index)
Removes the child corresponding to the given index. |
void
|
removeDrawable(Drawable drawable)
Removes the given region. |
void
|
scheduleDrawable(Drawable who, Runnable what, long when)
|
void
|
setAlpha(int alpha)
|
void
|
setChildDrawableAt(int index, Drawable drawable)
Sets the supplied region at given index. |
void
|
setColorFilter(ColorFilter colorFilter)
|
void
|
unscheduleDrawable(Drawable who, Runnable what)
|
Protected methods | |
---|---|
void
|
onBoundsChange(Rect bounds)
|
Inherited methods | |
---|---|
From
class
android.graphics.drawable.Drawable
| |
From
class
java.lang.Object
| |
From
interface
android.graphics.drawable.Drawable.Callback
|
Public constructors
Public methods
addChildDrawable
void addChildDrawable (Drawable drawable)
Adds the supplied region.
Parameters | |
---|---|
drawable |
Drawable |
getAlpha
int getAlpha ()
Returns | |
---|---|
int |
Alpha value between 0(inclusive) and 255(inclusive) |
getChildAt
CompositeDrawable.ChildDrawable getChildAt (int index)
Returns the CompositeDrawable.ChildDrawable
at the given index.
Parameters | |
---|---|
index |
int |
Returns | |
---|---|
CompositeDrawable.ChildDrawable |
getChildCount
int getChildCount ()
Returns the total number of children.
Returns | |
---|---|
int |
getDrawable
Drawable getDrawable (int index)
Returns the Drawable
for the given index.
Parameters | |
---|---|
index |
int |
Returns | |
---|---|
Drawable |
invalidateDrawable
void invalidateDrawable (Drawable who)
Parameters | |
---|---|
who |
Drawable |
removeChild
void removeChild (int index)
Removes the child corresponding to the given index.
Parameters | |
---|---|
index |
int |
removeDrawable
void removeDrawable (Drawable drawable)
Removes the given region.
Parameters | |
---|---|
drawable |
Drawable |
scheduleDrawable
void scheduleDrawable (Drawable who, Runnable what, long when)
Parameters | |
---|---|
who |
Drawable |
what |
Runnable |
when |
long |
setChildDrawableAt
void setChildDrawableAt (int index, Drawable drawable)
Sets the supplied region at given index.
Parameters | |
---|---|
index |
int |
drawable |
Drawable |
setColorFilter
void setColorFilter (ColorFilter colorFilter)
Parameters | |
---|---|
colorFilter |
ColorFilter |
unscheduleDrawable
void unscheduleDrawable (Drawable who, Runnable what)
Parameters | |
---|---|
who |
Drawable |
what |
Runnable |
Protected methods
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-04-11 UTC.