# 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)

*** ** * ** ***


```
public class DetailsParallax extends RecyclerViewParallax
```

<br />

|---|---|---|---|
| [java.lang.Object](https://developer.android.com/reference/java/lang/Object.html) ||||
| ↳ | [androidx.leanback.widget.Parallax](https://developer.android.com/reference/androidx/leanback/widget/Parallax) |||
|   | ↳ | [androidx.leanback.widget.RecyclerViewParallax](https://developer.android.com/reference/androidx/leanback/widget/RecyclerViewParallax) ||
|   |   | ↳ | [androidx.leanback.widget.DetailsParallax](https://developer.android.com/reference/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 `https://developer.android.com/reference/androidx/leanback/app/DetailsFragmentBackgroundController`.

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

## Summary

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

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

| ### Inherited methods |
|---|
| From [androidx.leanback.widget.Parallax](https://developer.android.com/reference/androidx/leanback/widget/Parallax) |---|---| | `https://developer.android.com/reference/androidx/leanback/widget/ParallaxEffect` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax#addEffect(androidx.leanback.widget.Parallax.PropertyMarkerValue...)(Parallax.PropertyMarkerValue[] ranges)` Create a `https://developer.android.com/reference/androidx/leanback/widget/ParallaxEffect` object that will track source variable changes within a provided set of ranges. | | `final PropertyT` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax#addProperty(java.lang.String)(https://developer.android.com/reference/java/lang/String.html name)` Add a new IntProperty in the Parallax object. | | `abstract PropertyT` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax#createProperty(java.lang.String,int)(https://developer.android.com/reference/java/lang/String.html name, int index)` Create a new Property object. | | `https://developer.android.com/reference/java/util/List.html<https://developer.android.com/reference/androidx/leanback/widget/ParallaxEffect>` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getEffects()()` Returns a list of `https://developer.android.com/reference/androidx/leanback/widget/ParallaxEffect` object which defines rules to perform mapping to multiple `https://developer.android.com/reference/androidx/leanback/widget/ParallaxTarget`s. | | `final https://developer.android.com/reference/java/util/List.html<PropertyT>` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax#getProperties()()` | | `void` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax#removeAllEffects()()` Remove all `https://developer.android.com/reference/androidx/leanback/widget/ParallaxEffect` objects. | | `void` | `https://developer.android.com/reference/androidx/leanback/widget/Parallax#removeEffect(androidx.leanback.widget.ParallaxEffect)(https://developer.android.com/reference/androidx/leanback/widget/ParallaxEffect effect)` Remove the `https://developer.android.com/reference/androidx/leanback/widget/ParallaxEffect` object. | |
| From [androidx.leanback.widget.RecyclerViewParallax](https://developer.android.com/reference/androidx/leanback/widget/RecyclerViewParallax) |---|---| | `https://developer.android.com/reference/androidx/leanback/widget/RecyclerViewParallax.ChildPositionProperty` | `https://developer.android.com/reference/androidx/leanback/widget/RecyclerViewParallax#createProperty(java.lang.String,int)(https://developer.android.com/reference/java/lang/String.html name, int index)` Create a new Property object. | | `float` | `https://developer.android.com/reference/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. | | `https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView` | `https://developer.android.com/reference/androidx/leanback/widget/RecyclerViewParallax#getRecyclerView()()` | | `void` | `https://developer.android.com/reference/androidx/leanback/widget/RecyclerViewParallax#setRecyclerView(androidx.recyclerview.widget.RecyclerView)(https://developer.android.com/reference/androidx/recyclerview/widget/RecyclerView recyclerView)` Set RecyclerView that this Parallax will register onScrollListener. | | `void` | `https://developer.android.com/reference/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)

```
public DetailsParallax()
```

## Public methods

### getOverviewRowBottom

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

```
public Parallax.IntProperty getOverviewRowBottom()
```

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)

```
public Parallax.IntProperty getOverviewRowTop()
```

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