All Projects → minibugdev → SheetSelection

minibugdev / SheetSelection

Licence: MIT license
An Android library for display list and be able to select the item as BottomSheet.

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to SheetSelection

Fabulousfilter
Android library to animate Floating Action Button to Bottom Sheet Dialog and vice-versa
Stars: ✭ 2,477 (+2814.12%)
Mutual labels:  bottomsheet
Quizzon
Quizzon: Create and play quizzes free
Stars: ✭ 48 (-43.53%)
Mutual labels:  hacktoberfest2022
Dseized-Bot
This repository contains all of the code required NOTE you may need to download other dependencies which will be mentioned below. This bot has many features such as playing songs in multiple servers and making a queue for songs.
Stars: ✭ 20 (-76.47%)
Mutual labels:  hacktoberfest2022
Alertview
A library to create simple alerts easily with some customization.
Stars: ✭ 222 (+161.18%)
Mutual labels:  bottomsheet
ultimate-seo-checklist
The ultimate SEO Checklist made by people all around the globe
Stars: ✭ 31 (-63.53%)
Mutual labels:  hacktoberfest2022
rn-emoji-keyboard
Super performant, lightweight, fully customizable emoji picker 🚀
Stars: ✭ 228 (+168.24%)
Mutual labels:  hacktoberfest2022
Sheetmenu
Library for speedy implementation menu with BottomSheet
Stars: ✭ 121 (+42.35%)
Mutual labels:  bottomsheet
Hacktoberfest
Everyone is free to contribute. Not eligible for Hacktoberfest
Stars: ✭ 36 (-57.65%)
Mutual labels:  hacktoberfest2022
SSImagePicker
Easy to use and configurable library to Pick an image from the Gallery or Capture an image using a Camera... 📸
Stars: ✭ 227 (+167.06%)
Mutual labels:  bottomsheet
hasura-auth
Authentication for Hasura.
Stars: ✭ 276 (+224.71%)
Mutual labels:  hacktoberfest2022
Jxbottomsheetview
A useful and gesture interaction BottomSheetView!
Stars: ✭ 237 (+178.82%)
Mutual labels:  bottomsheet
Stanley
An Android app explorer for developers (extract the manifest and other info from any installed application)
Stars: ✭ 82 (-3.53%)
Mutual labels:  hacktoberfest2022
pacstall
An AUR-inspired package manager for Ubuntu
Stars: ✭ 842 (+890.59%)
Mutual labels:  hacktoberfest2022
Bottomsheet
BottomSheet dialog library for Android
Stars: ✭ 219 (+157.65%)
Mutual labels:  bottomsheet
Linkify
A site that lets you include all your links in a single-page website with easy customizations. It gives you your own URL to share with anyone you want on the internet.
Stars: ✭ 29 (-65.88%)
Mutual labels:  hacktoberfest2022
Bottommenututorial
Android bottom dialog
Stars: ✭ 163 (+91.76%)
Mutual labels:  bottomsheet
CodeForces-Solutions
Solutions to CodeForces ProblemSets
Stars: ✭ 47 (-44.71%)
Mutual labels:  hacktoberfest2022
galgotias icloud feedback bot
No description or website provided.
Stars: ✭ 21 (-75.29%)
Mutual labels:  hacktoberfest2022
awesome-list
Lista de links úteis
Stars: ✭ 72 (-15.29%)
Mutual labels:  hacktoberfest2022
CompressorBot
A python based Telegram Bot for Compressing Videos with negligible Quality change
Stars: ✭ 162 (+90.59%)
Mutual labels:  hacktoberfest2022

Sheet Selection

Jitpack SheetSelection Android Arsenal GitHub license

SheetSelection is an Android library for display list and be able to select the item as a BottomSheet.

Sheet Selection

Installation

Add it in your root build.gradle at the end of repositories:

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

Add the dependency

dependencies {
    implementation 'com.github.minibugdev:sheetselection:0.0.3'
}

How to use

Sheet Selection

val items = listOf(
    SheetSelectionItem("1", "Item #1", R.drawable.ic_extension),
    SheetSelectionItem("2", "Item #2", R.drawable.ic_nature),
    SheetSelectionItem("3", "Item #3", R.drawable.ic_fingerprint),
    SheetSelectionItem("4", "Item #4", R.drawable.ic_face)
)

SheetSelection.Builder(context)
    .title("Sheet Selection")
    .items(items)
    .selectedPosition(2)
    .showDraggedIndicator(true)
    .searchEnabled(true)
    .searchNotFoundText("Nothing!!")
    .onItemClickListener { item, position -> 
        // DO SOMETHING
    }
    .show()

Configurations

  • Set title by Builder.title(String). It will hide when set to NULL or empty string.
  • Set items by Builder.items(List<SheetSelectionItem>).
  • Set selected item by Builder.selectedPosition(Int). default is SheetSelection.NO_SELECT
  • Show dragged indicator by Builder.showDraggedIndicator(Boolean). default is false
  • Set search enabled by Builder.searchEnabled(Boolean). default is false
  • Set search not found text by Builder.searchNotFoundText(String). default is Search not found.
  • Set custom theme by Builder.theme(@StyleRes).
  • To handle the item click listener by Builder.onItemClickListener().

Customize your own style

Sheet Selection

1.Define your theme and style

Add your theme and style to styles.xml or wherever you want.

1. Title text style parent must be Widget.SheetSelection.Title eg.

<style name="Widget.Custom.SheetSelection.Title" parent="@style/Widget.SheetSelection.Title">
    <item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Headline5</item>
    <item name="android:gravity">center</item>
</style>

2. Item text style parent must be Widget.SheetSelection.Item eg.

<style name="Widget.Custom.SheetSelection.Item" parent="@style/Widget.SheetSelection.Item">
    <item name="android:textAppearance">@style/TextAppearance.MaterialComponents.Caption</item>
    <item name="drawableTint">@color/colorPrimary</item>
</style>

3. Indicator style parent must be Widget.SheetSelection.Indicator eg.

<style name="Widget.Custom.SheetSelection.Indicator" parent="@style/Widget.SheetSelection.Indicator">
    <item name="android:layout_marginTop">48dp</item>
</style>

Finally, override SheetSelection attributes by setting your styles to your Theme (parent must be Theme.SheetSelection)

<!-- Customize SheetSelection theme -->
<style name="Theme.Custom.SheetSelection" parent="@style/Theme.SheetSelection">
    <item name="sheetSelection_titleStyle">@style/Widget.Custom.SheetSelection.Title</item>
    <item name="sheetSelection_itemStyle">@style/Widget.Custom.SheetSelection.Item</item>
    <item name="sheetSelection_indicatorStyle">@style/Widget.Custom.SheetSelection.Indicator</item>
    <item name="sheetSelection_indicatorColor">@color/colorAccent</item>
</style>

2. Apply your Theme to SheetSelection

SheetSelection.Builder(this)
    .theme(R.style.Theme_Custom_SheetSelection)
    ..
    .show()

License

MIT License

Copyright (c) 2020 Teeranai.P

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
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].