DetailsParallax

public class DetailsParallax extends RecyclerViewParallax


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.

Summary

Public constructors

Public methods

Parallax.IntProperty

Returns the bottom of the details overview row.

Parallax.IntProperty

Returns the top of the details overview row.

Inherited methods

From androidx.leanback.widget.Parallax
ParallaxEffect
addEffect(Parallax.PropertyMarkerValue[] ranges)

Create a ParallaxEffect object that will track source variable changes within a provided set of ranges.

final PropertyT

Add a new IntProperty in the Parallax object.

abstract PropertyT
createProperty(String name, int index)

Create a new Property object.

List<ParallaxEffect>

Returns a list of ParallaxEffect object which defines rules to perform mapping to multiple ParallaxTargets.

final List<PropertyT>
void

Remove all ParallaxEffect objects.

void

Remove the ParallaxEffect object.

From androidx.leanback.widget.RecyclerViewParallax
RecyclerViewParallax.ChildPositionProperty
createProperty(String name, int index)

Create a new Property object.

float

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
void

Set RecyclerView that this Parallax will register onScrollListener.

void

Manually update values.

Public constructors

DetailsParallax

Added in 1.1.0
public DetailsParallax()

Public methods

getOverviewRowBottom

Added in 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
public Parallax.IntProperty getOverviewRowTop()

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