Skip to content

Latest commit

 

History

History
69 lines (55 loc) · 1.92 KB

README.md

File metadata and controls

69 lines (55 loc) · 1.92 KB

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

alt text alt text

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'
}