DirectPropertyTarget
class DirectPropertyTarget<T : Any!, V : Number!> : 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 functions |
From class ParallaxTarget
Unit |
update(fraction: Float)
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.
|
|
Public constructors
<init>
DirectPropertyTarget(
targetObject: Any!,
property: Property<T, V>!)
Parameters |
targetObject |
Any!: Target object for perform Parallax |
property |
Property<T, V>!: Target property, either an Integer Property or a Float Property. |
Public methods
directUpdate
fun directUpdate(value: Number!): Unit
isDirectMapping
fun isDirectMapping(): Boolean
Returns true as DirectPropertyTarget receives a number to update Property in directUpdate(Number)
.
Return |
Boolean |
True if direct mapping, false otherwise. |