colorpicker


Source link: https://github.com/jaredrummler/ColorPicker

Color Picker

Yet another open source color picker for Android. So, why should you use this color picker? It is highly customizable and easy to use. You can simply add the ColorPreference to your preferences and a beautiful color picker dialog will be displayed without additional code. The color picker supports alpha and allows you to set your own presets.

The original ColorPickerView was written by Daniel Nilsson.

Screenshots

  

Usage

Add the ColorPreference to your preference XML:

<PreferenceScreen xmlns:android="http://schemas.android.com/apk/res/android"

 xmlns:app="http://schemas.android.com/apk/res-auto">
 <PreferenceCategory>

<com.jaredrummler.android.colorpicker.ColorPreference

android:defaultValue="@color/color_default"

android:key="default_color"

android:summary="@string/color_default_summary"

android:title="@string/color_default_title"/>

...
 </PreferenceCategory>  </PreferenceScreen>

You can add attributes to customize the ColorPreference:

name type documentation
cpv_dialogType enum "custom" to show the color picker, "preset" to show pre-defined colors
cpv_showAlphaSlider boolean Show a slider for changing the alpha of a color (adding transparency)
cpv_colorShape enum "square" or "circle" for the shape of the color preview
cpv_colorPresets reference An int-array of pre-defined colors to show in the dialog
cpv_dialogTitle reference The string resource id for the dialog title. By default the title is "Select a Color"
cpv_showColorShades boolean true to show different shades of the selected color
cpv_allowPresets boolean true to add a button to toggle to the custom color picker
cpv_allowCustom boolean true to add a button to toggle to the presets color picker
cpv_showDialog boolean true to let the ColorPreference handle showing the dialog

You can also show a ColorPickerDialog without using the ColorPreference:

ColorPickerDialog.newBuilder().setColor(color).show(activity);

All the attributes above can also be applied to the ColorPickerDialog. The activity that shows the dialog should implement ColorPickerDialogListener to get a callback when a color is selected.

For further doumentation about how to use the library, check the demo app included in this project.

Download

Download the latest AAR or grab via Gradle:

compile 'com.jaredrummler:colorpicker:1.0.1'

or Maven:

<dependency>
<groupId>com.jaredrummler</groupId>
<artifactId>colorpicker</artifactId>
<version>1.0.1</version>
<type>aar</type> </dependency>

License

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. 

Resources

A safe JsBridge framework.

PhotoFiltersSDK aims to provide fast, powerful and flexible image processing instrument for creating awesome effects on any image media.

Easy Android form validation in Rx way.

This library can be used to implement Material Designed Settings/Preference Screen on Pre-Lollipop devices.

A clean, minimalistic, easy-to-use and highly customizable pin lock custom view for Android.

HintCase is a library for Android that will help you create really awesome hints/tips for your apps.

Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes