GithubHelp home page GithubHelp logo

brk3 / android-color-picker Goto Github PK

View Code? Open in Web Editor NEW
29.0 7.0 36.0 128 KB

This is a small library for your Android application to enable the users to select an arbitrary color. I've abstracted this to a widget that can be added to any View.

Home Page: http://code.google.com/p/android-color-picker/

Java 100.00%

android-color-picker's Introduction

Android Color Picker
aka AmbilWarna library ("Pick a Color" in Indonesian)

This is a small library for your application to enable the users to select an arbitrary color. It is currently used in the free Bible applications for Android (http://androidbible.blogspot.com). It is also used by the >250,000 downloads app DigiClock Widget.

For example, your application has a feature to customize the color of some background, text, or maybe for a painting application where the user should be able to select different color for painting or filling.

Screenshot:
http://lh5.ggpht.com/_ODdyLCCXPpQ/TKsFBMSlhdI/AAAAAAAAu6o/vqpGqyCnywY/s800/r230-ambilwarna.png

This is an Android Library Project where you can include it into your main project.

How to use
Create a color picker dialog by calling the following constructor, and then show it.

AmbilWarnaDialog(Context context, int color, OnAmbilWarnaListener listener)
as follows:

    // initialColor is the initially-selected color to be shown 
    // in the rectangle on the left of the arrow.
    // for example, 0xff000000 is black, 0xff0000ff is blue. 
    // Please be aware of the initial 0xff which is the alpha.
    AmbilWarnaDialog dialog = AmbilWarnaDialog(this, initialColor,
            new OnAmbilWarnaListener() {
        @Override
        public void onOk(AmbilWarnaDialog dialog, int color) {
                // color is the color selected by the user.
        }
                
        @Override
        public void onCancel(AmbilWarnaDialog dialog) {
                // cancel was selected by the user
        }
    });

    dialog.show();

Contributors
Pascal Cans (noobs.com)

See also other projects for Android:

Context Menu with Icons
http://code.google.com/p/android-icon-context-menu/

android-color-picker's People

Contributors

brk3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

android-color-picker's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.