Skip to content

The Android Aroma BottomSheet package provides a customisable BottomSheet. This GitHub repository is a mirror, the official repository is hosted privately by Coffee IT.

License

Notifications You must be signed in to change notification settings

Coffee-IT-Development/BottomSheet-Android-Component

Repository files navigation

Coffee IT - Android Aroma BottomSheet Component

Maven Central API License Mirror Repository LinkedIn Facebook Instagram Follow coffeeitnl on Twitter

☕️ Android Aroma BottomSheet

The Android Aroma BottomSheet package provides a customisable BottomSheet. This README describes how to implement the BottomSheet into an app.

This GitHub repository is a mirror, the official repository is hosted privately by Coffee IT.

Created by Coffee IT.

⚡ Installation

This component requires minimum SDK 21.

Add the dependency to build.gradle.

Groovy:

dependencies {
    implementation "nl.coffeeit.aroma:bottomsheet:1.0.3"
}

KTS:

dependencies {
    implementation("nl.coffeeit.aroma:bottomsheet:1.0.3")
}

📖 Usage

To use the BottomSheet in a project, simply add it to your code like this:

BottomSheetWithContent(
    activityContentScope = { state, scope ->
        Button(onClick = {
            scope.launch {
                state.show()
            }
        }) {
            Text("This goes behind the sheet")
        }
    },
    
    sheetContent = {
        Text(text = "This goes inside the sheet")
    }
)

Two parameters are required:

activityContentScope holds the content that should be displayed initially, when the bottom sheet is hidden. It offers a state to toggle the visibility of the bottom sheet and a coroutine scope

sheetContent represents a Composable that is the the content of the actual sheet. XML can also be used here, since it can be inflated in a Composable.

⚙️ Customisation

BottomSheetWithContent accepts the following optional parameters:

  • backgroundColor A Color object to set the background of the bottom sheet
  • scrimColor A Color object to set the color of the area behind the sheet
  • width The width of the bottom sheet (default is fill screen width)
  • bottomMargin Margin for the bottom of the sheet, to make a floating variant (default 0)
  • cornerShape A RoundedCornerShape object to give the sheet rounded edges
  • accessory Decides the accessory of the BottomSheet, can be: -- NONE -- GRABBER -- CLOSE_BUTTON

✏️ Changelog

The changelog can be found here.

🔗 Related publications

Look at our other repositories on our GitHub account.

📧 Contact

Do you have questions, ideas or need help? Send us an email at contact@coffeeit.nl.

The Coffee IT logo

⚠️ License

The Android Aroma BottomSheet package is licensed under the terms of the MIT Open Source license, combined with the Commons Clause licence.

About

The Android Aroma BottomSheet package provides a customisable BottomSheet. This GitHub repository is a mirror, the official repository is hosted privately by Coffee IT.

Topics

Resources

License

Stars

Watchers

Forks

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy