DetailsParallax


class DetailsParallax : 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 functions

Parallax.IntProperty!

Returns the bottom of the details overview row.

Parallax.IntProperty!

Returns the top of the details overview row.

Inherited functions

From androidx.leanback.widget.Parallax
ParallaxEffect!

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

PropertyT!

Add a new IntProperty in the Parallax object.

abstract PropertyT!
createProperty(name: String!, index: Int)

Create a new Property object.

(Mutable)List<ParallaxEffect!>!

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

(Mutable)List<PropertyT!>!
Unit

Remove all ParallaxEffect objects.

Unit

Remove the ParallaxEffect object.

From androidx.leanback.widget.RecyclerViewParallax
RecyclerViewParallax.ChildPositionProperty!
createProperty(name: String!, index: Int)

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!
Unit
setRecyclerView(recyclerView: RecyclerView!)

Set RecyclerView that this Parallax will register onScrollListener.

Unit

Manually update values.

Public constructors

DetailsParallax

Added in 1.1.0
DetailsParallax()

Public functions

getOverviewRowBottom

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

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