CustomBottomSheetBehavior Library for Android
- Create Anchor Bottom Sheet
- Fixed Tab Layout Scrolling on View Pager
You can import the example of this Library, or you can see this video :
Add the maven repo url to your build.gradle on projek:
repositories {
maven { url 'https://jitpack.io' }
}
Add the library to the dependencies:
dependencies {
implementation 'com.github.rahmadarifan:CustomBottomSheetBehavior:v0.0.1'
}
Use CustomBottomSheetBehavior
and set app:behavior for your bottom sheet view:
app:behavior_anchorOffset="224dp"
app:behavior_defaultState="anchored"
app:behavior_peekHeight="192dp"
app:layout_behavior="com.rahmadarifan.library.custombottomsheetbehavior.CustomBottomSheetBehavior"
Setup your ViewPager
inside the bottom sheet with BottomSheetUtils:
BottomSheetUtils.setupViewPager(viewPager);