ParallaxTarget.DirectPropertyTarget
public
static
final
class
ParallaxTarget.DirectPropertyTarget
extends ParallaxTarget
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
Inherited methods |
From class
androidx.leanback.widget.ParallaxTarget
void
|
directUpdate(Number value)
Directly update the target using a float or int value.
|
boolean
|
isDirectMapping()
Returns true if the ParallaxTarget is directly mapping from source value,
directUpdate(Number) will be used to update value, otherwise update(fraction) will
be called to update value.
|
void
|
update(float fraction)
Implementation class is supposed to update target with the provided fraction
(between 0 and 1).
|
|
From class
java.lang.Object
Object
|
clone()
|
boolean
|
equals(Object arg0)
|
void
|
finalize()
|
final
Class<?>
|
getClass()
|
int
|
hashCode()
|
final
void
|
notify()
|
final
void
|
notifyAll()
|
String
|
toString()
|
final
void
|
wait(long arg0, int arg1)
|
final
void
|
wait(long arg0)
|
final
void
|
wait()
|
|
Public constructors
DirectPropertyTarget
public 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
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
public boolean isDirectMapping ()
Returns true as DirectPropertyTarget receives a number to update Property in
directUpdate(Number)
.
Returns |
boolean |
True if direct mapping, false otherwise. |