ParallaxTarget.PropertyValuesHolderTarget


class ParallaxTarget.PropertyValuesHolderTarget : ParallaxTarget


PropertyValuesHolderTarget is an implementation of ParallaxTarget that uses PropertyValuesHolder to update the target object.

Summary

Public constructors

PropertyValuesHolderTarget(
    targetObject: Any!,
    values: PropertyValuesHolder!
)

Public functions

Unit
update(fraction: Float)

Implementation class is supposed to update target with the provided fraction (between 0 and 1).

Inherited functions

From androidx.leanback.widget.ParallaxTarget
Unit

Directly update the target using a float or int value.

Boolean

Returns true if the ParallaxTarget is directly mapping from source value, directUpdate will be used to update value, otherwise update(fraction) will be called to update value.

Public constructors

PropertyValuesHolderTarget

Added in 1.1.0
PropertyValuesHolderTarget(
    targetObject: Any!,
    values: PropertyValuesHolder!
)

Public functions

update

fun update(fraction: Float): Unit

Implementation class is supposed to update target with the provided fraction (between 0 and 1). The fraction represents percentage of completed change (e.g. scroll) on target. Called only when isDirectMapping is false.

Parameters
fraction: Float

Fraction between 0 to 1.

See also
isDirectMapping