inboxrecyclerview / me.saket.inboxrecyclerview / ScrollSuppressibleRecyclerView

ScrollSuppressibleRecyclerView

abstract class ScrollSuppressibleRecyclerView : RecyclerView

Freezing layout using setLayoutFrozen isn't sufficient for blocking programmatic scrolls i.e., scrolls not initiated by the user. These scrolls are either requested by the app or by RV when a child View requests focus.

Constructors

<init>

ScrollSuppressibleRecyclerView(context: Context, attrs: AttributeSet?)

Freezing layout using setLayoutFrozen isn't sufficient for blocking programmatic scrolls i.e., scrolls not initiated by the user. These scrolls are either requested by the app or by RV when a child View requests focus.

Functions

canScrollProgrammatically

abstract fun canScrollProgrammatically(): Boolean

scrollBy

open fun scrollBy(x: Int, y: Int): Unit

scrollTo

open fun scrollTo(x: Int, y: Int): Unit

scrollToPosition

open fun scrollToPosition(position: Int): Unit

smoothScrollBy

open fun smoothScrollBy(dx: Int, dy: Int): Unit

smoothScrollToPosition

open fun smoothScrollToPosition(position: Int): Unit

Extension Functions

executeOnMeasure

fun View.executeOnMeasure(listener: () -> Unit): Unit

Execute a runnable when a view's dimensions get measured and is laid out on the screen.

executeOnNextLayout

fun View.executeOnNextLayout(listener: () -> Unit): Unit

Execute a runnable when the next global layout happens for a View. Example usage includes waiting for a list to draw its children just after you have updated its adapter's data-set.

globalVisibleRect

fun View.globalVisibleRect(): RectF

locationOnScreen

fun View.locationOnScreen(loc: IntArray): Rect

Inheritors

InboxRecyclerView

open class InboxRecyclerView : ScrollSuppressibleRecyclerView, InternalPageCallbacks

A RecyclerView where items can expand and collapse to and from an ExpandablePageLayout.