Save the date! Android Dev Summit is coming to Sunnyvale, CA on Oct 23-24, 2019.

PagedSmoothScroller

class PagedSmoothScroller : LinearSmoothScroller
kotlin.Any
   ↳ androidx.recyclerview.widget.RecyclerView.SmoothScroller
   ↳ androidx.recyclerview.widget.LinearSmoothScroller
   ↳ androidx.car.widget.PagedSmoothScroller

Custom LinearSmoothScroller that has:

  • Custom control over the speed of scrolls.
  • Scrolling that snaps to start of a child view.

Summary

Inherited constants
Public constructors
<init>(context: Context!)

Protected methods
Float

Int

Int

Unit

Inherited functions
Inherited properties

Public constructors

<init>

PagedSmoothScroller(context: Context!)

Protected methods

calculateSpeedPerPixel

protected fun calculateSpeedPerPixel(displayMetrics: DisplayMetrics!): Float

getVerticalSnapPreference

protected fun getVerticalSnapPreference(): Int

calculateTimeForDeceleration

protected fun calculateTimeForDeceleration(dx: Int): Int

onTargetFound

protected fun onTargetFound(targetView: View, state: RecyclerView.State, action: RecyclerView.SmoothScroller.Action): Unit