ChildDrawable

class ChildDrawable
kotlin.Any
   ↳ androidx.leanback.graphics.CompositeDrawable.ChildDrawable

Wrapper class holding a drawable object and BoundsRule to update drawable bounds when parent bound changes.

Summary

Public constructors
<init>(drawable: Drawable!, parent: CompositeDrawable!)

Public methods
BoundsRule!

Returns the instance of BoundsRule.

Unit

After changing the BoundsRule, user should call this function for the drawable to recalculate its bounds.

Drawable!

Returns the Drawable.

Properties
static Property<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideBottom attribute.

static Property<CompositeDrawable.ChildDrawable!, Float!>!

Implementation of Property for overwriting the bottom attribute of BoundsRule associated with this ChildDrawable.

static Property<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideLeft attribute.

static Property<CompositeDrawable.ChildDrawable!, Float!>!

Implementation of Property for overwriting the bottom attribute of BoundsRule associated with this ChildDrawable.

static Property<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideRight attribute.

static Property<CompositeDrawable.ChildDrawable!, Float!>!

Implementation of Property for overwriting the bottom attribute of BoundsRule associated with this ChildDrawable.

static Property<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideTop attribute.

static Property<CompositeDrawable.ChildDrawable!, Float!>!

Implementation of Property for overwriting the bottom attribute of BoundsRule associated with this ChildDrawable.

Public constructors

<init>

ChildDrawable(drawable: Drawable!, parent: CompositeDrawable!)

Public methods

getBoundsRule

fun getBoundsRule(): BoundsRule!

Returns the instance of BoundsRule.

recomputeBounds

fun recomputeBounds(): Unit

After changing the BoundsRule, user should call this function for the drawable to recalculate its bounds.

getDrawable

fun getDrawable(): Drawable!

Returns the Drawable.

Properties

BOTTOM_ABSOLUTE

static val BOTTOM_ABSOLUTE: Property<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideBottom attribute.

BOTTOM_FRACTION

static val BOTTOM_FRACTION: Property<CompositeDrawable.ChildDrawable!, Float!>!

Implementation of Property for overwriting the bottom attribute of BoundsRule associated with this ChildDrawable. This allows users to change the bounds rules as a percentage of parent size. This is preferable over {@see PROPERTY_BOTTOM_ABSOLUTE} when the exact start/end position of scroll movement isn't available at compile time.

LEFT_ABSOLUTE

static val LEFT_ABSOLUTE: Property<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideLeft attribute.

LEFT_FRACTION

static val LEFT_FRACTION: Property<CompositeDrawable.ChildDrawable!, Float!>!

Implementation of Property for overwriting the bottom attribute of BoundsRule associated with this ChildDrawable. This allows users to change the bounds rules as a percentage of parent size. This is preferable over {@see PROPERTY_LEFT_ABSOLUTE} when the exact start/end position of scroll movement isn't available at compile time.

RIGHT_ABSOLUTE

static val RIGHT_ABSOLUTE: Property<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideRight attribute.

RIGHT_FRACTION

static val RIGHT_FRACTION: Property<CompositeDrawable.ChildDrawable!, Float!>!

Implementation of Property for overwriting the bottom attribute of BoundsRule associated with this ChildDrawable. This allows users to change the bounds rules as a percentage of parent size. This is preferable over {@see PROPERTY_RIGHT_ABSOLUTE} when the exact start/end position of scroll movement isn't available at compile time.

TOP_ABSOLUTE

static val TOP_ABSOLUTE: Property<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideTop attribute.

TOP_FRACTION

static val TOP_FRACTION: Property<CompositeDrawable.ChildDrawable!, Float!>!

Implementation of Property for overwriting the bottom attribute of BoundsRule associated with this ChildDrawable. This allows users to change the bounds rules as a percentage of parent size. This is preferable over {@see PROPERTY_TOP_ABSOLUTE} when the exact start/end position of scroll movement isn't available at compile time.