• Stars
    star
    207
  • Rank 184,065 (Top 4 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created about 5 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A color picker bottom sheet 🌈

ColorSheet

A color picker bottom sheet

Download

implementation "dev.sasikanth:colorsheet:1.0.1"

Usage

Default color sheet, it will show grid of colors

portfolio_view


ColorSheet().colorPicker(
    colors = colors,
    listener = { color ->
        // Handle color
    })
    .show(supportFragmentManager)

Color sheet with "no color" option

portfolio_view


ColorSheet().colorPicker(
    colors = colors,
    noColorOption = true,
    listener = { color ->
        // Handle color
    })
    .show(supportFragmentManager)

With this you will get a no color option at start, when user selects this it will return ColorSheet.NO_COLOR.


To mark the color as selected in color sheet, specify selectedColor in colorPicker

ColorSheet().colorPicker(
    colors = colors,
    selectedColor = color,
    listener = { color ->
        // Handle color
    })
    .show(supportFragmentManager)

Misc

Corner radius Default corner radius is 4dp. You can set your own corner radius like this

ColorSheet().cornerRadius(radius)

Color to Hex string

ColorSheetUtils.colorToHex(color)

Sheet title textAppearance

    <style name="AppTheme" parent="Theme.MaterialComponents">
        <item name="colorSheetTitleFont">@font/font</item>
        <item name="colorSheetTitleLineHeightHint">@dimen/line_height_hint</item> // in sp
        <item name="colorSheetTitleLetterSpacing">0</item>
    </style>

License

Copyright 2019 Sasikanth Miriyampalli

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

twine

Twine: A multiplatform RSS reader built using Kotlin and Compose
Kotlin
1,418
star
2

pinnit

Pin notes in notifications on Android
Kotlin
226
star
3

android-resource-poet

Kotlin DSL to create Android resource XML
Kotlin
40
star
4

bloom

Kotlin
39
star
5

material-color-utilities-kmm

KMM port of Material Color Utilities
Kotlin
37
star
6

fancy-switch

A Material 3 esque button with a fancy reveal animations when toggling between states
Kotlin
34
star
7

tweet-unroll-android

App to unroll Twitter threads. Built using Kotlin & Compose
Kotlin
27
star
8

qr_scanner

A sample QR scanner using CameraX and zxing
Kotlin
26
star
9

Gaze

NASA Picture of the Day
Kotlin
20
star
10

EpoxySample

Kotlin
18
star
11

compose_colorpicker

A gradient color picker made in Jetpack compose
Kotlin
17
star
12

paw

Kotlin
14
star
13

IN-Flutter

A sample news app written in flutter
Dart
14
star
14

MinioZooperTemplate

Simple,Fast and Beautiful dash for you Zooper Widgets
Java
12
star
15

simple-compose

Kotlin
8
star
16

Wallpapers

Sample Wallpaper application made in Kotlin Language
Kotlin
8
star
17

view-navigator-sample

Sample app using custom view based `Navigator` implementation.
Kotlin
8
star
18

figma-plugin-kt

Kotlin
6
star
19

plaid-components

Common UI Components used in Plaid - extracted and packaged as single Android Library
Java
5
star
20

my-project-templates

Kotlin
4
star
21

android-template

Kotlin
3
star
22

base-android

Android project template I use
Kotlin
3
star
23

Frames

A full-of-features, easy-to-customize, free and open source, light-weight, Material Design dashboard library to create Android Wallpapers apps with almost-null effort.
Java
2
star
24

mobius-ktx

Adds coroutines and flow support to Mobius
Kotlin
1
star
25

readability

Kotlin
1
star
26

flutter_digital_clock

Dart
1
star
27

asld-sample

AnimatedStateListDrawable sample
Kotlin
1
star
28

android_10_alarm_sample

Android 10 alarm sample
Kotlin
1
star
29

flutter_counter_redux

Flutter counter application built using flutter_redux
Dart
1
star