# ParallaxTarget.PropertyValuesHolderTarget

# ParallaxTarget.PropertyValuesHolderTarget

Artifact:[androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback)  
[View Source](https://cs.android.com/search?q=file:androidx/leanback/widget/ParallaxTarget.java+class:androidx.leanback.widget.ParallaxTarget.PropertyValuesHolderTarget)  
Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)

*** ** * ** ***

Kotlin\|[Java](https://developer.android.com/reference/androidx/leanback/widget/ParallaxTarget.PropertyValuesHolderTarget "View this page in Java")

<br />

```
class ParallaxTarget.PropertyValuesHolderTarget : ParallaxTarget
```

<br />

|---|---|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)                                                                                                            |||
| ↳ | [androidx.leanback.widget.ParallaxTarget](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget)                                                          ||
|   | ↳ | [androidx.leanback.widget.ParallaxTarget.PropertyValuesHolderTarget](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget.PropertyValuesHolderTarget) |

*** ** * ** ***

PropertyValuesHolderTarget is an implementation of[ParallaxTarget](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget)that uses[PropertyValuesHolder](https://developer.android.com/reference/android/animation/PropertyValuesHolder.html)to update the target object.

## Summary

|                                                                                                                                                                                                                        ### Public constructors                                                                                                                                                                                                                        |
|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [PropertyValuesHolderTarget](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget.PropertyValuesHolderTarget#PropertyValuesHolderTarget(java.lang.Object,android.animation.PropertyValuesHolder))`(` ` targetObject: `[Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html)`!,` ` values: `[PropertyValuesHolder](https://developer.android.com/reference/android/animation/PropertyValuesHolder.html)`!` `)` |

|                             ### Public functions                              |
|-------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html) | [update](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget.PropertyValuesHolderTarget#update(float))`(fraction: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)`)` Implementation class is supposed to update target with the provided fraction (between 0 and 1). |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.leanback.widget.ParallaxTarget](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget) |-------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)       | [directUpdate](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget#directUpdate(java.lang.Number))`(value: `[Number](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-number/index.html)`!)` Directly update the target using a float or int value.                                                                                                                                            | | [Boolean](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html) | [isDirectMapping](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget#isDirectMapping())`()` Returns true if the ParallaxTarget is directly mapping from source value,[directUpdate](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget#directUpdate(java.lang.Number))will be used to update value, otherwise update(fraction) will be called to update value. | |

## Public constructors

### PropertyValuesHolderTarget

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#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](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget#isDirectMapping())is false.  

|                                         Parameters                                          |
|---------------------------------------------------------------------------------------------|--------------------------|
| `fraction: `[Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | Fraction between 0 to 1. |

|                                                          See also                                                           |
|-----------------------------------------------------------------------------------------------------------------------------|---|
| [isDirectMapping](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget#isDirectMapping()) |   |