Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

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 overrideTop attribute.

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

Implementation of Property for overrideBottom attribute.

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

Implementation of Property for overrideLeft attribute.

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!, Float!>!

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

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

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

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

TOP_ABSOLUTE

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

Implementation of Property for overrideTop attribute.

BOTTOM_ABSOLUTE

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

Implementation of Property for overrideBottom attribute.

LEFT_ABSOLUTE

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

Implementation of Property for overrideLeft attribute.

RIGHT_ABSOLUTE

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

Implementation of Property for overrideRight 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 TOP_ABSOLUTE when the exact start/end position of scroll movement isn't available at compile time.

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 BOTTOM_ABSOLUTE when the exact start/end position of scroll movement isn't available at compile time.

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 LEFT_ABSOLUTE when the exact start/end position of scroll movement isn't available at compile time.

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 RIGHT_ABSOLUTE when the exact start/end position of scroll movement isn't available at compile time.