GithubHelp home page GithubHelp logo

andor201995 / android-lockable-bottom-sheet Goto Github PK

View Code? Open in Web Editor NEW

This project forked from beta/android-lockable-bottom-sheet

1.0 2.0 0.0 97 KB

A simple hack on the design library's Bottom Sheet to make it noncancellable.

License: MIT License

Java 100.00%

android-lockable-bottom-sheet's Introduction

Android Lockable Bottom Sheet

JitPack Badge

Android Lockable Bottom Sheet is a library built on top of the Android Design Support Library, and provides a simple hack on the bottom sheet dialogs to make them able to be noncancelable.

The bottom sheet dialogs have been introduced in the Android Design Support Library since version 23.2, which is a new way to provide user with a list of actions, information, etc. However, the implementation provided by the design library doesn't allow developers to make the dialogs persistent easily, and by saying "persistent" I mean a dialog could not be canceled by neither clicking outside it, nor swiping down on the dialog.

So this library offers an easy way to "lock" a bottom sheet dialog by overriding the setCancelable method. You can download and play with the demo app from the Releases page to see how it works yourself.

Download

This library is published on JitPack. Add the following lines to your project's root build.gradle:

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

And add the dependency to build.gradle in your app's module:

dependencies {
    compile 'net.kyouko:android-lockable-bottom-sheet:0.1.0'
}

And that's it.

License

MIT

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.