RecyclerViewParallax
class RecyclerViewParallax : Parallax
DetailsParallax |
Subclass of Parallax object that tracks overview row's top and bottom edge in DetailsFragment or DetailsSupportFragment. |
Implementation of Parallax class for RecyclerView. This class allows users to track position of specific views inside RecyclerView relative to itself. See ChildPositionProperty for details.
Summary
Nested types |
|---|
|
Subclass of |
Public constructors |
|---|
Public functions |
|
|---|---|
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. |
Inherited functions |
||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Public constructors
Public functions
createProperty
fun createProperty(name: String!, index: Int): RecyclerViewParallax.ChildPositionProperty!
Create a new Property object. App does not directly call this method. See addProperty.
| Parameters | |
|---|---|
name: String! |
Name of the property in this Parallax object |
index: Int |
Index of the property in this Parallax object. |
| Returns | |
|---|---|
RecyclerViewParallax.ChildPositionProperty! |
Newly created Property object. |
getMaxValue
fun getMaxValue(): 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. The size can be used to calculate marker value using the provided fraction of FloatPropertyMarkerValue.
| Returns | |
|---|---|
Float |
Size of parent visible area. |
getRecyclerView
fun getRecyclerView(): RecyclerView!
| Returns | |
|---|---|
RecyclerView! |
Currently RecylerView that the source has registered onScrollListener. |
setRecyclerView
fun setRecyclerView(recyclerView: RecyclerView!): Unit
Set RecyclerView that this Parallax will register onScrollListener.
| Parameters | |
|---|---|
recyclerView: RecyclerView! |
RecyclerView to register onScrollListener. |
updateValues
fun updateValues(): Unit
Manually update values. This is used for changes not controlled by RecyclerView. E.g. called by a Slide transition that changes translation of the view.