Skip to content

Simple, lightweight and customizable color picker dialog for your android app.

License

Notifications You must be signed in to change notification settings

d33kshant/colorpicker.java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

colorpicker.java

Simple, lightweight and customizable color picker dialog for your android app.

Preview

Screenshot

Implementation

  1. Place color_picker_dialog.xml in your layout folder.
  2. Place ColorPickerDialog.java in your java folder.
  3. Change package name in ColorPickerDialog.java to your app package.

Usage

  1. Open the color picker dialog
ColorPickerDialog dialog = new ColorPickerDialog(initialColor);
dialog.show(getSupportFragmentManager(), "Color Picker");
  1. Implement listener
public class YourActivity extends AppCompatActivity implements ColorPickerDialog.setColorPickerListener {  
  @Override
  public void applyColor(int color) {
       //use this 'color' value in your code
       yourFunction(color);      
  }
}

⚠️ Note: Make sure to configure the package name in java file correctly.

About

Simple, lightweight and customizable color picker dialog for your android app.

Topics

Resources

License

Stars

Watchers

Forks

Languages