Skip to content

savvisingh/ColorPickerDialog

Repository files navigation

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

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages