All Projects → HeyAlex → Bottomdrawer

HeyAlex / Bottomdrawer

Licence: mit
BottomSheet with animations

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Bottomdrawer

BalloonPopup
Forget Android Toast! BalloonPopup displays a round or squared popup and attaches it to a View, like a callout. Uses the Builder pattern for maximum ease. The popup can automatically hide and can persist when the value is updated.
Stars: ✭ 32 (-89%)
Mutual labels:  android-ui
Xtimer Flutter App
Flutter timer app
Stars: ✭ 255 (-12.37%)
Mutual labels:  android-ui
Carbon
Material Design implementation for Android 4.0+. Shadows, ripples, vectors, fonts, animations, widgets, rounded corners and more.
Stars: ✭ 2,942 (+911%)
Mutual labels:  android-ui
FancyTab
No description or website provided.
Stars: ✭ 15 (-94.85%)
Mutual labels:  android-ui
RecyclerELE
Android Library for easy addition of Empty, Loading and Error views in a RecyclerView
Stars: ✭ 27 (-90.72%)
Mutual labels:  android-ui
Materiallettericon
Material first letter icon like lollipop contacts icon. Letter(s) on a shape drawn on canvas.
Stars: ✭ 255 (-12.37%)
Mutual labels:  android-ui
CustomFontView
Custom View classes for TextView, EditText & Buttons - to set custom fonts
Stars: ✭ 26 (-91.07%)
Mutual labels:  android-ui
Spotlight
Android Library that lights items for tutorials or walk-throughs etc...
Stars: ✭ 3,143 (+980.07%)
Mutual labels:  android-ui
android-SpringAnimator
A framer.js DHO and RK4 spring animation port for Android.
Stars: ✭ 39 (-86.6%)
Mutual labels:  android-ui
Slidingrootnav
DrawerLayout-like ViewGroup, where a "drawer" is hidden under the content view, which can be shifted to make the drawer visible.
Stars: ✭ 2,939 (+909.97%)
Mutual labels:  android-ui
SwipeRefreshPlus
参考swiperefreshlayout添加下拉加载更多
Stars: ✭ 24 (-91.75%)
Mutual labels:  android-ui
Coffeegram
Android app using Jetpack Compose together with StateFlow and MVI
Stars: ✭ 155 (-46.74%)
Mutual labels:  android-ui
Tableview
TableView is a powerful Android library for displaying complex data structures and rendering tabular data composed of rows, columns and cells.
Stars: ✭ 2,928 (+906.19%)
Mutual labels:  android-ui
KotlinProject
This repo help for all developer who want to learn android or want to work on advance feature of android. This repo created with help of @awesomeui, @materialdesign and android latest feature. this repo contain major feature like : @awesome UI, @Material design, @firebase (auth, realtime database, firestore, push notification), @database (Room d…
Stars: ✭ 40 (-86.25%)
Mutual labels:  android-ui
Touchdemo
Custom touch handling in Android
Stars: ✭ 273 (-6.19%)
Mutual labels:  android-ui
FloatingView
FloatingView moved by finger supporting OverlaySystem, OverlayActivity, OverlayViewGroup modes
Stars: ✭ 58 (-80.07%)
Mutual labels:  android-ui
Handygridview
HandyGridView是一个高仿支付宝,网易新闻的高性能的标签可拖动排序的GridView。
Stars: ✭ 255 (-12.37%)
Mutual labels:  android-ui
Stickyscrollview
Sticky header and footer for android ScrollView.
Stars: ✭ 284 (-2.41%)
Mutual labels:  android-ui
Cornersheet
Behavior to expand view from corner
Stars: ✭ 274 (-5.84%)
Mutual labels:  android-ui
Sequent
A simple continuous animation library for Android UI.
Stars: ✭ 263 (-9.62%)
Mutual labels:  android-ui

Bottom Drawer

Easy way to make Bottom Sheet with animation

Usage

To customize Bottom Drawer you need to define a new style with extending BottomDialogTheme

You can use the following properties in your BottomDrawer Theme.

Properties Type Default
should_draw_under_status_bar boolean false
should_draw_content_under_handle_view boolean false
bottom_sheet_corner_radius dimension 10dp
bottom_sheet_extra_padding dimension 4dp
bottom_drawer_background color WHITE

It will be something like:

<style name="CustomTheme" parent="BottomDialogTheme">
      <item name="bottom_sheet_extra_padding">4dp</item>
      <item name="should_draw_under_status_bar">true</item>
</style>

You can make your own HandleView and implement TranslationUpdater interface for getting callbacks. Or you can use defined handle views by library like PlainHandleView or PullHandleView (check sample app).

After customizing theme and choosing handle view, you need to override configureBottomDrawer method and pass theme, handle view to BottomDrawerFragment.

So the following example will make Google Tasks fragment like on main preview:

class GoogleTaskExampleDialog : BottomDrawerFragment() {

    override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle?): View? {
        super.onCreateView(inflater, container, savedInstanceState)
        return inflater.inflate(R.layout.your_layout, container, false)
    }

    override fun configureBottomDrawer(): BottomDrawerDialog {
        return BottomDrawerDialog.build(context!!) {
            theme = R.style.Plain
            //configure handle view
            handleView = PlainHandleView(context).apply {
                val widthHandle =
                    resources.getDimensionPixelSize(R.dimen.bottom_sheet_handle_width)
                val heightHandle =
                    resources.getDimensionPixelSize(R.dimen.bottom_sheet_handle_height)
                val params =
                    FrameLayout.LayoutParams(widthHandle, heightHandle, Gravity.CENTER_HORIZONTAL)

                params.topMargin =
                    resources.getDimensionPixelSize(R.dimen.bottom_sheet_handle_top_margin)

                layoutParams = params
            }
        }
    }
}

You also can change color and corner by code in BottomDrawerFragment:

changeCornerRadius(radius: Float)
changeBackgroundColor(color: Int)

Integration

This library is available on jitpack, so you need to add this repository to your root build.gradle:

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

Add the dependency:

dependencies {
    implementation 'com.github.HeyAlex:BottomDrawer:v1.0.0'
}

Samples

You can find more samples in app module, to understand functionality of library.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].