I have this code running: Color picker with usage in android perfectly, althought it doens't show the color white, gray, black, etc..to choose.
What do I need to change in code for being able to choose that colors?
Thank you!
I have this code running: Color picker with usage in android perfectly, althought it doens't show the color white, gray, black, etc..to choose.
What do I need to change in code for being able to choose that colors?
Thank you!
You can customize the one that you mentioned in your question also. You will need to do some modifications in the ColorPickerView
class.
You can also try an alternative color picker available in the below link.
Download the zip file from
http://code.google.com/p/yuku-android-util/source/browse/#git%2FAmbilWarna
Extract the zip file.
Import the library project (AmbilWarna) into workspace as you would do for any other library projects like google play services or actionbarsherlock.
Reference the library in your android project
On Button Click or some action
AmbilWarnaDialog dialog = new AmbilWarnaDialog(MainActivity.this, Color.RED, new OnAmbilWarnaListener() {
@Override
public void onOk(AmbilWarnaDialog dialog, int color) {
// color is the color selected by the user.
mPaint.setColor(color); // set color here
}
@Override
public void onCancel(AmbilWarnaDialog dialog) {
// cancel was selected by the user
}
});
dialog.show();