ColorPickerDialog

Additional

Language
Java
Version
N/A
Created
Apr 10, 2017
Updated
Apr 11, 2017 (Retired)
Owner
Sarabjeet Singh (savvisingh)
Contributor
Sarabjeet Singh (savvisingh)
1
Activity
Badge
Generate
Download
Source code

Color Picker Dialog

ColorPickerDialog is an Android Library providing color picker dialog for single color or multi color selection from the ArrayList of colors provided by developer.

Screenshots

Usage

    1. Opening Single Selection ColorPicker
ColorPickerDialog dialog = ColorPickerDialog.newInstance(
                            ColorPickerDialog.SELECTION_SINGLE,
                            closestColorsList,
                            3, // Number of columns
                            ColorPickerDialog.SIZE_SMALL);
                
dialog.show(getFragmentManager(), "some_tag");   
    1. Opening Multi Selection ColorPicker
ColorPickerDialog dialog = ColorPickerDialog.newInstance(
                ColorPickerDialog.SELECTION_MULTI,
                closestColorsList,
                3, // Number of columns
                ColorPickerDialog.SIZE_SMALL);

dialog.show(getFragmentManager(), "some_tag");
  • Dialog OnClick Listener
dialog.setOnDialodButtonListener(new ColorPickerDialog.OnDialogButtonListener() {
            @Override
            public void onDonePressed(ArrayList<Integer> mSelectedColors) {
                Log.d("selected colors", mSelectedColors.size() + " ");
            }
            @Override
            public void onDismiss() {
            }
        });

Import ColorPickerDialog dependency

declare it into your pom.xml

<dependency>
  <groupId>ColorPalletteSelection</groupId>
  <artifactId>colorpickerdialog</artifactId>
  <version>1.0.1</version>
  <type>pom</type>
</dependency>

or into your build.gradle

dependencies {
    compile 'ColorPalletteSelection:colorpickerdialog:1.0.1'
}