NestedScrollableHost

class NestedScrollableHost : FrameLayout

Layout to wrap a scrollable component inside a ViewPager2. Provided as a solution to the problem where pages of ViewPager2 have nested scrollable elements that scroll in the same direction as ViewPager2. The scrollable element needs to be the immediate and only child of this host layout.

This solution has limitations when using multiple levels of nested scrollable elements (e.g. a horizontal RecyclerView in a vertical RecyclerView in a horizontal ViewPager2).

Constructors

NestedScrollableHost
Link copied to clipboard
fun NestedScrollableHost(context: Context)
NestedScrollableHost
Link copied to clipboard
fun NestedScrollableHost(context: Context, attrs: AttributeSet?)

Functions

onInterceptTouchEvent
Link copied to clipboard
open override fun onInterceptTouchEvent(e: MotionEvent): Boolean