CompositeDrawable.ChildDrawable
public final class CompositeDrawable.ChildDrawable
Wrapper class holding a drawable object and BoundsRule to update drawable bounds when parent bound changes.
Summary
Constants |
|
|---|---|
static final Property<CompositeDrawable.ChildDrawable, Integer> |
Implementation of |
static final Property<CompositeDrawable.ChildDrawable, Float> |
Implementation of |
static final Property<CompositeDrawable.ChildDrawable, Integer> |
Implementation of |
static final Property<CompositeDrawable.ChildDrawable, Float> |
Implementation of |
static final Property<CompositeDrawable.ChildDrawable, Integer> |
Implementation of |
static final Property<CompositeDrawable.ChildDrawable, Float> |
Implementation of |
static final Property<CompositeDrawable.ChildDrawable, Integer> |
Implementation of |
static final Property<CompositeDrawable.ChildDrawable, Float> |
Implementation of |
Public constructors |
|---|
ChildDrawable( |
Public methods |
|
|---|---|
@NonNull BoundsRule |
Returns the instance of |
@NonNull Drawable |
Returns the |
void |
After changing the |
Constants
BOTTOM_ABSOLUTE
public static final Property<CompositeDrawable.ChildDrawable, Integer> BOTTOM_ABSOLUTE
Implementation of Property for overrideBottom attribute.
BOTTOM_FRACTION
public static final Property<CompositeDrawable.ChildDrawable, Float> BOTTOM_FRACTION
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
public static final Property<CompositeDrawable.ChildDrawable, Integer> LEFT_ABSOLUTE
Implementation of Property for overrideLeft attribute.
LEFT_FRACTION
public static final Property<CompositeDrawable.ChildDrawable, Float> LEFT_FRACTION
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
public static final Property<CompositeDrawable.ChildDrawable, Integer> RIGHT_ABSOLUTE
Implementation of Property for overrideRight attribute.
RIGHT_FRACTION
public static final Property<CompositeDrawable.ChildDrawable, Float> RIGHT_FRACTION
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
public static final Property<CompositeDrawable.ChildDrawable, Integer> TOP_ABSOLUTE
Implementation of Property for overrideTop attribute.
TOP_FRACTION
public static final Property<CompositeDrawable.ChildDrawable, Float> TOP_FRACTION
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
public ChildDrawable(
@NonNull Drawable drawable,
@NonNull CompositeDrawable parent
)
Public methods
getBoundsRule
public @NonNull BoundsRule getBoundsRule()
Returns the instance of BoundsRule.
recomputeBounds
public void recomputeBounds()
After changing the BoundsRule, user should call this function for the drawable to recalculate its bounds.