Atul Gupta
11/26/2023, 7:20 PMAtul Gupta
11/26/2023, 7:24 PMclass BottomSheetExcludedNestedScrollViewIds<T : View> @JvmOverloads constructor(
context: Context,
attrib: AttributeSet? = null,
) : BottomSheetBehavior<T>(context, attrib)
{
override fun onStartNestedScroll(
coordinatorLayout: CoordinatorLayout,
child: T,
directTargetChild: View,
target: View,
axes: Int,
type: Int,
): Boolean
{
return if (target.id in listOfExcludedNestedScrollViewIds)
{
// excluding the nested scroll for few ids present in `listOfExcludedNestedScrollViewIds`
false
}
else
{
super.onStartNestedScroll(
coordinatorLayout,
child,
directTargetChild,
target,
axes,
type
)
}
}
/**
* List of ids for which nested scroll will be ignored
*/
val listOfExcludedNestedScrollViewIds = arrayListOf<Int>()
}
Atul Gupta
11/26/2023, 9:50 PMAtul Gupta
11/29/2023, 9:22 AMMR3Y
11/29/2023, 6:22 PMAtul Gupta
11/29/2023, 6:31 PMAtul Gupta
11/30/2023, 11:00 AMMR3Y
11/30/2023, 11:16 AM