Skip to content

shishanksingh2015/colorpicker

Repository files navigation

Android Arsenal

colorpicker

A custom color picker that will pick colors from any image.

Gradle

compile 'com.github.shishanksingh2015:colorpicker:v1.0'

Maven

<dependency>
	    <groupId>com.github.shishanksingh2015</groupId>
	    <artifactId>colorpicker</artifactId>
	    <version>v1.0</version>
	</dependency>

Implementation

Android Color picker, is a custom image or drawable color picker.It is very easy to use and customize.It track the color change continuously on moving picker and also on track color change on tap of color picker.

Android Dial Number Picker

Usage

  • In XML layout:
    <com.colorpicker.shishank.colorpicker.ColorPicker
        android:id="@+id/colorPicker"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"/>
        
  • Value Change Listener
   colorPicker.setGradientView(R.drawable.color_picker);
        colorPicker.setColorSelectedListener(new ColorPicker.ColorSelectedListener() {
            @Override
            public void onColorSelected(@ColorInt int color, boolean isTapUp) {
                imageView.setBackgroundColor(color);
                if (isTapUp) {
                    Toast.makeText(MainActivity.this, "On Tap Up called", Toast.LENGTH_SHORT).show();
                }
            }
        });

Please feel free to contribute by pull request, issues or feature requests.