Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Add dependency
dependencies {
implementation 'com.github.rizmaulana:floating-slideup-sheet:0.1.0'
}
Add FloatingSlideUpLayout
to your layout, it will contains two view item for floating menu and expanded panel
<id.rizmaulana.floatingslideupsheet.view.FloatingSlideUpLayout
tools:visibility="invisible"
android:id="@+id/floating_slideup_sheet"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="16dp"
android:paddingRight="16dp"
android:paddingBottom="16dp">
<FrameLayout
android:id="@+id/container_floating_menu">
...
</FrameLayout>
<LinearLayout
android:id="@+id/container_expanded_content">
...
</LinearLayout>
</id.rizmaulana.floatingslideupsheet.view.FloatingSlideUpLayout>
Setup FloatingSlideUpPanel
on your view class
val floatingSlideUpSheet = FloatingSlideUpBuilder(this, floating_slideup_sheet)
.setFloatingMenuRadiusInDp(32)
.setFloatingMenuColor(android.R.color.white)
.setFloatingMenu(container_floating_menu)
.setPanel(container_expanded_content)
.build()
Now you have awesome floating slideup sheet on your app 🎉
Note : Expandable panel already has NestedScrollView
, no need add manually, your content will automatically scrollable.
floatingSlideUpSheet.collapseBottomSheet
floatingSlideUpSheet.expandBottomSheet
- Support dark mode
- Build floating menu from menu item
- Eliminate code smells
- Add test
Pull requests are welcome.