belongs to Maven artifact com.android.support:recyclerview-v7:28.0.0-alpha1
RecyclerView.LayoutManager
public
static
abstract
class
RecyclerView.LayoutManager
extends Object
java.lang.Object | |
↳ | android.support.v7.widget.RecyclerView.LayoutManager |
![]() |
![]() |
A LayoutManager
is responsible for measuring and positioning item views
within a RecyclerView
as well as determining the policy for when to recycle
item views that are no longer visible to the user. By changing the LayoutManager
a RecyclerView
can be used to implement a standard vertically scrolling list,
a uniform grid, staggered grids, horizontally scrolling collections and more. Several stock
layout managers are provided for general use.
Context
, AttributeSet
, int
, int
), RecyclerView will
instantiate and set the LayoutManager when being inflated. Most used properties can
be then obtained from getProperties(Context, AttributeSet, int, int)
. In case
a LayoutManager specifies both constructors, the non-default constructor will take
precedence.
Summary
Nested classes | |
---|---|
interface |
RecyclerView.LayoutManager.LayoutPrefetchRegistry
Interface for LayoutManagers to request items to be prefetched, based on position, with specified distance from viewport, which indicates priority. |
class |
RecyclerView.LayoutManager.Properties
Some general properties that a LayoutManager may want to use. |
XML attributes | |
---|---|
RecyclerView_android_orientation |
|
RecyclerView_reverseLayout |
|
RecyclerView_spanCount |
|
RecyclerView_stackFromEnd |
Public constructors | |
---|---|
RecyclerView.LayoutManager()
|
Public methods | |
---|---|
void
|
addDisappearingView(View child, int index)
To be called only during |
void
|
addDisappearingView(View child)
To be called only during |