Skip to content

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

License

Notifications You must be signed in to change notification settings

rizmaulana/floating-slideup-sheet

Repository files navigation

Floating SlideUp Sheet 🎉

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

alt text

Interaction

GitHub forks GitHub contributors GitHub top language Visitor

Installation

allprojects {
    repositories {
	...
	maven { url 'https://jitpack.io' }
	}
}

Add dependency

dependencies {
	implementation 'com.github.rizmaulana:floating-slideup-sheet:0.1.0'
}

How to use

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.

Expand and Collapse Expandable Panel Programatically

floatingSlideUpSheet.collapseBottomSheet

floatingSlideUpSheet.expandBottomSheet

Todo

  • Support dark mode
  • Build floating menu from menu item
  • Eliminate code smells
  • Add test

Contributing

Pull requests are welcome.

License

MIT

About

Simple and lightweight UI library for user new experience, combining floating bottom navigation and bottom sheet behaviour. Simple and beautiful.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages