-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can not use vpbs in project with androidx #35
Comments
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: