ParallaxTarget.PropertyValuesHolderTarget


public final class ParallaxTarget.PropertyValuesHolderTarget extends ParallaxTarget


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

Summary

Public constructors

PropertyValuesHolderTarget(
    Object targetObject,
    PropertyValuesHolder values
)

Public methods

void
update(float fraction)

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

Inherited methods

From androidx.leanback.widget.ParallaxTarget
void

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
public PropertyValuesHolderTarget(
    Object targetObject,
    PropertyValuesHolder values
)

Public methods

update

public void update(float fraction)

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
float fraction

Fraction between 0 to 1.

See also
isDirectMapping