HoloColorPicker


Source link: https://github.com/LarsWerkman/HoloColorPicker

Android Holo ColorPicker

Marie Schweiz http://marie-schweiz.de/ made a beautifull new design for the Holo ColorPicker which added a lot of new functionality.

You can now set the Saturation and Value of a color. Also its possible to set the Opacity for a color.

You can also set the last selected color and see the difference with the new selected color.

Demo can be found on my Google Drive here if interested. the code of the sample can be found at a gist here

UDPATE

Now bars can change their orientation, Thanks to [tonyr59h]( https://github.com/tonyr59h) also the gradle build version was updated to 0.7.+ ![image]( https://lh5.googleusercontent.com/-3KSukk_S94Y/UvKiNER-OBI/AAAAAAAAA-k/8SPfOmFhLjE//device-2014-02-05-180704_framed.png)

Documentation

To add the ColorPicker to your layout add this to your xml

<com.larswerkman.holocolorpicker.ColorPicker
  android:id="@+id/picker"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"/>

To add a Saturation/Value bar to your layout add this to your xml

<com.larswerkman.holocolorpicker.SVBar
  android:id="@+id/svbar"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"/>

The same goes for the Opacity bar

<com.larswerkman.holocolorpicker.OpacityBar
  android:id="@+id/opacitybar"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"/>

Saturation bar

<com.larswerkman.holocolorpicker.SaturationBar
  android:id="@+id/saturationbar"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"/>

and a Value bar

<com.larswerkman.holocolorpicker.ValueBar
  android:id="@+id/valuebar"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"/>

To connect the bars with the colorpicker and to get the selected color.

ColorPicker picker = (ColorPicker) findViewById(R.id.picker);
 SVBar svBar = (SVBar) findViewById(R.id.svbar);
 OpacityBar opacityBar = (OpacityBar) findViewById(R.id.opacitybar);
 SaturationBar saturationBar = (SaturationBar) findViewById(R.id.saturationbar);
 ValueBar valueBar = (ValueBar) findViewById(R.id.valuebar);

picker.addSVBar(svBar);
 picker.addOpacityBar(opacityBar);
 picker.addSaturationBar(saturationBar);
 picker.addValueBar(valueBar);
  //To get the color picker.getColor();
  //To set the old selected color u can do it like this picker.setOldCenterColor(picker.getColor());
 // adds listener to the colorpicker which is implemented //in the activity picker.setOnColorChangedListener(this);
  //to turn of showing the old color picker.setShowOldCenterColor(false);
  //adding onChangeListeners to bars opacitybar.setOnOpacityChangeListener(new OnOpacityChangeListener …) valuebar.setOnValueChangeListener(new OnValueChangeListener …) saturationBar.setOnSaturationChangeListener(new OnSaturationChangeListener …)

Dependency

Adding it as a dependency to your project.
dependencies {
  compile 'com.larswerkman:HoloColorPicker:1.5' 
}
 

License

 Copyright 2012 Lars Werkman
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. 

Devoleped By

**Lars Werkman**

Resources

When showing a really enchanting explanatory animation to your users, but you know that after a while it'll get tedious and would stop users wanting to use your app. QuickSand is here to solve that problem.

Automatically manipulates the duration of animations depending on how many times the user has viewed them.

EndlessRecyclerViewAdapter support for RecyclerView.Adapter.

Fast Google Cloud Messaging (GCM) integration library for Android. Includes Topic Messaging.

A sliding tabs layout implemented with the RecyclerView.

A material style input for put codes.

Android library to create complex multi-state animations.

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