Giter VIP home page Giter VIP logo

floating-slideup-sheet's Introduction

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

floating-slideup-sheet's People

Contributors

rizmaulana avatar 0xflotus avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.