belongs to Maven artifact com.android.support:leanback-v17:28.0.0-alpha1
RecyclerViewParallax.ChildPositionProperty
public
static
final
class
RecyclerViewParallax.ChildPositionProperty
extends Parallax.IntProperty
java.lang.Object | |||
↳ | android.util.Property<android.support.v17.leanback.widget.Parallax, java.lang.Integer> | ||
↳ | android.support.v17.leanback.widget.Parallax.IntProperty | ||
↳ | android.support.v17.leanback.widget.RecyclerViewParallax.ChildPositionProperty |
Subclass of Parallax.IntProperty
. Using this Property, users can track a
RecylerView child's position inside recyclerview. i.e.
tracking_pos = view.top + fraction * view.height() + offset
This way we can track top using fraction 0 and bottom using fraction 1.
Summary
Inherited constants |
---|
![]()
android.support.v17.leanback.widget.Parallax.IntProperty
|
Public methods | |
---|---|
RecyclerViewParallax.ChildPositionProperty
|
adapterPosition(int adapterPosition)
Sets adapter position of the recyclerview child to track. |
RecyclerViewParallax.ChildPositionProperty
|
fraction(float fraction)
Sets fraction of size to be added to view's start position. |
int
|
getAdapterPosition()
Returns adapter position of the recyclerview child to track. |
float
|
getFraction()
Returns fraction of size to be added to view's start position. |
int
|
getOffset()
Returns offset in pixels added to the view's start position. |
int
|
getViewId()
Returns view Id of a descendant of recyclerview child to track. |
RecyclerViewParallax.ChildPositionProperty
|
offset(int offset)
Sets offset in pixels added to the view's start position. |
RecyclerViewParallax.ChildPositionProperty
|
viewId(int viewId)
Sets view Id of a descendant of recyclerview child to track. |
Inherited methods | |
---|---|
![]()
android.support.v17.leanback.widget.Parallax.IntProperty
| |
![]()
android.util.Property
| |
![]()
java.lang.Object
|
Public methods
adapterPosition
RecyclerViewParallax.ChildPositionProperty adapterPosition (int adapterPosition)
Sets adapter position of the recyclerview child to track.
Parameters | |
---|---|
adapterPosition |
int : Zero based position in adapter. |
Returns | |
---|---|
RecyclerViewParallax.ChildPositionProperty |
This ChildPositionProperty object. |
fraction
RecyclerViewParallax.ChildPositionProperty fraction (float fraction)
Sets fraction of size to be added to view's start position. e.g. to track the center position of the view, use fraction 0.5; to track the end position of the view use fraction 1.
Parameters | |
---|---|
fraction |
float : Fraction of size of the view. |
Returns | |
---|---|
RecyclerViewParallax.ChildPositionProperty |
This ChildPositionProperty object. |
getAdapterPosition
int getAdapterPosition ()
Returns adapter position of the recyclerview child to track.
Returns | |
---|---|
int |
getFraction
float getFraction ()
Returns fraction of size to be added to view's start position. e.g. to track the center position of the view, use fraction 0.5; to track the end position of the view use fraction 1.
Returns | |
---|---|
float |
getOffset
int getOffset ()
Returns offset in pixels added to the view's start position.
Returns | |
---|---|
int |
getViewId
int getViewId ()
Returns view Id of a descendant of recyclerview child to track.
Returns | |
---|---|
int |
offset
RecyclerViewParallax.ChildPositionProperty offset (int offset)
Sets offset in pixels added to the view's start position.
Parameters | |
---|---|
offset |
int : Offset in pixels added to the view's start position. |
Returns | |
---|---|
RecyclerViewParallax.ChildPositionProperty |
This ChildPositionProperty object. |
viewId
RecyclerViewParallax.ChildPositionProperty viewId (int viewId)
Sets view Id of a descendant of recyclerview child to track.
Parameters | |
---|---|
viewId |
int : Id of a descendant of recyclerview child. |
Returns | |
---|---|
RecyclerViewParallax.ChildPositionProperty |
This ChildPositionProperty object. |
Interfaces
- BaseGridView.OnKeyInterceptListener
- BaseGridView.OnMotionInterceptListener
- BaseGridView.OnTouchInterceptListener
- BaseGridView.OnUnhandledKeyListener
- BaseOnItemViewClickedListener
- BaseOnItemViewSelectedListener
- BrowseFrameLayout.OnChildFocusListener
- BrowseFrameLayout.OnFocusSearchListener
- FacetProvider
- FacetProviderAdapter
- FocusHighlight
- FragmentAnimationProvider
- ImeKeyMonitor
- ImeKeyMonitor.ImeKeyListener
- MultiActionsProvider
- OnActionClickedListener
- OnChildLaidOutListener
- OnChildSelectedListener
- OnItemViewClickedListener
- OnItemViewSelectedListener
- PlaybackSeekUi
- SearchBar.SearchBarListener
- SearchBar.SearchBarPermissionListener
- SearchEditText.OnKeyboardDismissListener
- SpeechRecognitionCallback
- TitleViewAdapter.Provider
- ViewHolderTask
Classes
- AbstractDetailsDescriptionPresenter
- AbstractDetailsDescriptionPresenter.ViewHolder
- AbstractMediaItemPresenter
- AbstractMediaItemPresenter.ViewHolder
- AbstractMediaListHeaderPresenter
- AbstractMediaListHeaderPresenter.ViewHolder
- Action
- ArrayObjectAdapter
- BaseCardView
- BaseCardView.LayoutParams
- BaseGridView
- BrowseFrameLayout
- ClassPresenterSelector