LinearLayoutManager
open class LinearLayoutManager : RecyclerView.LayoutManager, ItemTouchHelper.ViewDropHandler, RecyclerView.SmoothScroller.ScrollVectorProvider
kotlin.Any | ||
↳ | androidx.recyclerview.widget.RecyclerView.LayoutManager | |
↳ | androidx.recyclerview.widget.LinearLayoutManager |
A RecyclerView.LayoutManager
implementation which provides similar functionality to android.widget.ListView
.
Summary
Nested classes | |
---|---|
open |
Constants | |
---|---|
static Int | |
static Int | |
static Int |
Public constructors | |
---|---|
Creates a vertical LinearLayoutManager |
|
<init>(context: Context!, attrs: AttributeSet!, defStyleAttr: Int, defStyleRes: Int) Constructor used when layout manager is set in XML by RecyclerView attribute "layoutManager". |
Public methods | |
---|---|
open Unit |
assertNotInLayoutOrScroll(message: String!) |
open Boolean | |
open Boolean | |
open Unit |
collectAdjacentPrefetchPositions(dx: Int, dy: Int, state: RecyclerView.State!, layoutPrefetchRegistry: RecyclerView.LayoutManager.LayoutPrefetchRegistry!) |
open Unit |
collectInitialPrefetchPositions(adapterItemCount: Int, layoutPrefetchRegistry: RecyclerView.LayoutManager.LayoutPrefetchRegistry!) |
open Int | |
open Int | |
open Int | |
open PointF? |
computeScrollVectorForPosition(targetPosition: Int) |
open Int | |
open Int | |
open Int | |
open Int |
Returns the adapter position of the first fully visible view. |
open Int |
Returns the adapter position of the first visible view. |
open Int |
Returns the adapter position of the last fully visible view. |
open Int |
Returns the adapter position of the last visible view. |
open View? |
findViewByPosition(position: Int) Finds the view which represents the given adapter position. |
open RecyclerView.LayoutParams! |
Create a default |
open Int |
Gets the number of items to prefetch in |
open Int |
Returns the current orientation of the layout. |
open Boolean |
Returns whether LayoutManager will recycle its children when it is detached from RecyclerView. |
open Boolean |
Returns if views are laid out from the opposite direction of the layout. |
open Boolean | |
open Boolean | |
open Boolean |
Returns the current state of the smooth scrollbar feature. |
open Unit |
onDetachedFromWindow(view: RecyclerView!, recycler: RecyclerView.Recycler!) |
open View? |
onFocusSearchFailed(focused: View, focusDirection: Int, recycler: RecyclerView.Recycler, state: RecyclerView.State) |
open Unit | |
open Unit |
onLayoutChildren(recycler: RecyclerView.Recycler!, state: RecyclerView.State!) Lay out all relevant child views from the given adapter. |
open Unit |
onLayoutCompleted(state: RecyclerView.State!) |
open Unit |
onRestoreInstanceState(state: Parcelable!) |
open Parcelable? | |
open Unit |
prepareForDrop(@NonNull view: View, @NonNull target: View, x: Int, y: Int) Called by the |
open Int |
scrollHorizontallyBy(dx: Int, recycler: RecyclerView.Recycler!, state: RecyclerView.State!) Scroll horizontally by dx pixels in screen coordinates and return the distance traveled. |
open Unit |
scrollToPosition(position: Int) Scroll the RecyclerView to make the position visible. |
open Unit |
scrollToPositionWithOffset(position: Int, offset: Int) Scroll to the specified adapter position with the given offset from resolved layout start. |
open Int |
scrollVerticallyBy(dy: Int, recycler: RecyclerView.Recycler!, state: RecyclerView.State!) Scroll vertically by dy pixels in screen coordinates and return the distance traveled. |
open Unit |
setInitialPrefetchItemCount(itemCount: Int) |