Open moradi-morteza opened 4 years ago
Hi, did you find a solution?
Check forked repo https://github.com/svrlopatrik/ViewPagerBottomSheet
Try this:
// ViewPagerBottomSheetBehavior.kt
// must be in the same package as BottomSheetBehavior
package com.google.android.material.bottomsheet
import android.content.Context
import android.util.AttributeSet
import android.view.View
import androidx.coordinatorlayout.widget.CoordinatorLayout
import java.lang.ref.WeakReference
class ViewPagerBottomSheetBehavior<V : View>(context: Context, attrs: AttributeSet?) : BottomSheetBehavior<V>(context, attrs) {
override fun onStartNestedScroll(coordinatorLayout: CoordinatorLayout, child: V, directTargetChild: View, target: View, axes: Int, type: Int): Boolean {
nestedScrollingChildRef = WeakReference(target)
return super.onStartNestedScroll(coordinatorLayout, child, directTargetChild, target, axes, type)
}
}
https://gist.github.com/nolanamy/9fc31c3056e561fa22d6e3ef71630870
hello i have a project with androidx and i add vpbs module in my project but in class ViewPagerUtils layoutParams.position (position is private in viewpager in androidx) so i have an error and can not use vbps now how i should do? thanks