added in version 1.0.0
belongs to Maven artifact androidx.leanback:leanback:1.0.0-beta01

ParallaxTarget.DirectPropertyTarget

public static final class ParallaxTarget.DirectPropertyTarget
extends ParallaxTarget

java.lang.Object
   ↳ androidx.leanback.widget.ParallaxTarget
     ↳ androidx.leanback.widget.ParallaxTarget.DirectPropertyTarget<T, V extends java.lang.Number>


DirectPropertyTarget is to support direct mapping into either Integer Property or Float Property. App uses convenient method ParallaxEffect.target(Object, Property) to add a direct mapping.

Summary

Public constructors

ParallaxTarget.DirectPropertyTarget(Object targetObject, Property<T, V> property)

Public methods

void directUpdate(Number value)

Directly update the target using a float or int value.

boolean isDirectMapping()

Returns true as DirectPropertyTarget receives a number to update Property in directUpdate(Number).

Inherited methods

Public constructors

ParallaxTarget.DirectPropertyTarget

added in version 1.0.0
public ParallaxTarget.DirectPropertyTarget (Object targetObject, 
                Property<T, V> property)

Parameters
targetObject Object: Target object for perform Parallax

property Property: Target property, either an Integer Property or a Float Property.

Public methods

directUpdate

added in version 1.0.0
public void directUpdate (Number value)

Directly update the target using a float or int value. Called when isDirectMapping() is true.

Parameters
value Number: Either int or float value.

isDirectMapping

added in version 1.0.0
public boolean isDirectMapping ()

Returns true as DirectPropertyTarget receives a number to update Property in directUpdate(Number).

Returns
boolean True if direct mapping, false otherwise.