CompositeDrawable.ChildDrawable


class CompositeDrawable.ChildDrawable


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

Summary

Constants

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

Implementation of Property for overrideBottom attribute.

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

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

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

Implementation of Property for overrideLeft attribute.

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

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

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

Implementation of Property for overrideRight attribute.

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

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

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

Implementation of Property for overrideTop attribute.

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

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

Public constructors

Public functions

BoundsRule

Returns the instance of BoundsRule.

Drawable

Returns the Drawable.

Unit

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

Constants

BOTTOM_ABSOLUTE

Added in 1.1.0
const val BOTTOM_ABSOLUTEProperty<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideBottom attribute.

BOTTOM_FRACTION

Added in 1.1.0
const val BOTTOM_FRACTIONProperty<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_ABSOLUTE

Added in 1.1.0
const val LEFT_ABSOLUTEProperty<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideLeft attribute.

LEFT_FRACTION

Added in 1.1.0
const val LEFT_FRACTIONProperty<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_ABSOLUTE

Added in 1.1.0
const val RIGHT_ABSOLUTEProperty<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideRight attribute.

RIGHT_FRACTION

Added in 1.1.0
const val RIGHT_FRACTIONProperty<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.

TOP_ABSOLUTE

Added in 1.1.0
const val TOP_ABSOLUTEProperty<CompositeDrawable.ChildDrawable!, Int!>!

Implementation of Property for overrideTop attribute.

TOP_FRACTION

Added in 1.1.0
const val TOP_FRACTIONProperty<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.

Public constructors

ChildDrawable

Added in 1.1.0
ChildDrawable(drawable: Drawable, parent: CompositeDrawable)

Public functions

getBoundsRule

Added in 1.1.0
fun getBoundsRule(): BoundsRule

Returns the instance of BoundsRule.

getDrawable

Added in 1.1.0
fun getDrawable(): Drawable

Returns the Drawable.

recomputeBounds

Added in 1.1.0
fun recomputeBounds(): Unit

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