# DetailsParallax

# DetailsParallax

Artifact:[androidx.leanback:leanback](https://developer.android.com/jetpack/androidx/releases/leanback)  
[View Source](https://cs.android.com/search?q=file:androidx/leanback/widget/DetailsParallax.java+class:androidx.leanback.widget.DetailsParallax)  
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/DetailsParallax "View this page in Java")

<br />

```
class DetailsParallax : RecyclerViewParallax
```

<br />

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

*** ** * ** ***

Subclass of Parallax object that tracks overview row's top and bottom edge in DetailsFragment or DetailsSupportFragment.

It can be used for both creating cover image parallax effect and controlling video playing when transitioning to/from half/full screen. A direct use case is[androidx.leanback.app.DetailsFragmentBackgroundController](https://developer.android.com/reference/kotlin/androidx/leanback/app/DetailsFragmentBackgroundController).  

|                                                                           See also                                                                            |
|---------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| [getParallax](https://developer.android.com/reference/kotlin/androidx/leanback/app/DetailsFragment#getParallax())                                             |   |
| [DetailsFragmentBackgroundController](https://developer.android.com/reference/kotlin/androidx/leanback/app/DetailsFragmentBackgroundController)               |   |
| [getParallax](https://developer.android.com/reference/kotlin/androidx/leanback/app/DetailsSupportFragment#getParallax())                                      |   |
| [DetailsSupportFragmentBackgroundController](https://developer.android.com/reference/kotlin/androidx/leanback/app/DetailsSupportFragmentBackgroundController) |   |

## Summary

|                                                     ### Public constructors                                                      |
|----------------------------------------------------------------------------------------------------------------------------------|
| [DetailsParallax](https://developer.android.com/reference/kotlin/androidx/leanback/widget/DetailsParallax#DetailsParallax())`()` |

|                                                  ### Public functions                                                   |
|-------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [Parallax.IntProperty](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax.IntProperty)`!` | [getOverviewRowBottom](https://developer.android.com/reference/kotlin/androidx/leanback/widget/DetailsParallax#getOverviewRowBottom())`()` Returns the bottom of the details overview row. |
| [Parallax.IntProperty](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax.IntProperty)`!` | [getOverviewRowTop](https://developer.android.com/reference/kotlin/androidx/leanback/widget/DetailsParallax#getOverviewRowTop())`()` Returns the top of the details overview row.          |

|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              ### Inherited functions                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| From[androidx.leanback.widget.Parallax](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax) |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ParallaxEffect](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxEffect)`!`                                                                                                                                                                                                         | [addEffect](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax#addEffect(androidx.leanback.widget.Parallax.PropertyMarkerValue...))`(ranges: `[Array](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-array/index.html)`<`[Parallax.PropertyMarkerValue](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax.PropertyMarkerValue)`!>!)` Create a[ParallaxEffect](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxEffect)object that will track source variable changes within a provided set of ranges. | | `PropertyT!`                                                                                                                                                                                                                                                                                                        | [addProperty](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax#addProperty(java.lang.String))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!)` Add a new IntProperty in the Parallax object.                                                                                                                                                                                                                                                                                                                                | | `abstract PropertyT!`                                                                                                                                                                                                                                                                                               | [createProperty](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax#createProperty(java.lang.String,int))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!, index: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Create a new Property object.                                                                                                                                                                                                                                                | | `(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<`[ParallaxEffect](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxEffect)`!>!` | [getEffects](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax#getEffects())`()` Returns a list of[ParallaxEffect](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxEffect)object which defines rules to perform mapping to multiple[ParallaxTarget](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxTarget)s.                                                                                                                                                                                             | | `(`[Mutable](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-mutable-list/index.html)`)`[List](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin.collections/-list/index.html)`<PropertyT!>!`                                                                                                  | [getProperties](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax#getProperties())`()`                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                                       | [removeAllEffects](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax#removeAllEffects())`()` Remove all[ParallaxEffect](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxEffect)objects.                                                                                                                                                                                                                                                                                                                                                   | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                                                                                                                                                                       | [removeEffect](https://developer.android.com/reference/kotlin/androidx/leanback/widget/Parallax#removeEffect(androidx.leanback.widget.ParallaxEffect))`(effect: `[ParallaxEffect](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxEffect)`!)` Remove the[ParallaxEffect](https://developer.android.com/reference/kotlin/androidx/leanback/widget/ParallaxEffect)object.                                                                                                                                                                                                  | |
| From[androidx.leanback.widget.RecyclerViewParallax](https://developer.android.com/reference/kotlin/androidx/leanback/widget/RecyclerViewParallax) |---------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [RecyclerViewParallax.ChildPositionProperty](https://developer.android.com/reference/kotlin/androidx/leanback/widget/RecyclerViewParallax.ChildPositionProperty)`!` | [createProperty](https://developer.android.com/reference/kotlin/androidx/leanback/widget/RecyclerViewParallax#createProperty(java.lang.String,int))`(name: `[String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html)`!, index: `[Int](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html)`)` Create a new Property object.       | | [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html)                                                                                     | [getMaxValue](https://developer.android.com/reference/kotlin/androidx/leanback/widget/RecyclerViewParallax#getMaxValue())`()` Return the max value which is typically size of parent visible area, e.g. RecyclerView's height if we are tracking Y position of a child.                                                                                                     | | [RecyclerView](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView)`!`                                                         | [getRecyclerView](https://developer.android.com/reference/kotlin/androidx/leanback/widget/RecyclerViewParallax#getRecyclerView())`()`                                                                                                                                                                                                                                       | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                       | [setRecyclerView](https://developer.android.com/reference/kotlin/androidx/leanback/widget/RecyclerViewParallax#setRecyclerView(androidx.recyclerview.widget.RecyclerView))`(recyclerView: `[RecyclerView](https://developer.android.com/reference/kotlin/androidx/recyclerview/widget/RecyclerView)`!)` Set RecyclerView that this Parallax will register onScrollListener. | | [Unit](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html)                                                                                       | [updateValues](https://developer.android.com/reference/kotlin/androidx/leanback/widget/RecyclerViewParallax#updateValues())`()` Manually update values.                                                                                                                                                                                                                     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |

## Public constructors

### DetailsParallax

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)  

```
DetailsParallax()
```  

## Public functions

### getOverviewRowBottom

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)  

```
fun getOverviewRowBottom(): Parallax.IntProperty!
```

Returns the bottom of the details overview row. This is tracked for implementing the parallax effect.  

### getOverviewRowTop

Added in[1.1.0](https://developer.android.com/jetpack/androidx/releases/leanback#1.1.0)  

```
fun getOverviewRowTop(): Parallax.IntProperty!
```

Returns the top of the details overview row. This is tracked for implementing the parallax effect.