Android 12 Developer Preview is here! Try it out, and give us your feedback!

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
<init>(context: Context!)

Creates a vertical LinearLayoutManager

<init>(context: Context!, orientation: Int, reverseLayout: Boolean)

<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

open Boolean

open Boolean

open Unit

open Unit

open Int

open Int

open Int

open PointF?

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?

Finds the view which represents the given adapter position.

open RecyclerView.LayoutParams!

Create a default LayoutParams object for a child of the RecyclerView.

open Int

Gets the number of items to prefetch in