How can I make ChiralCode - Android-Color-Picker appear in a dialog window?

I found the following link ‘’. I copied' and’ . I’ve been trying to make that dialog box appear somehow … but I still can’t figure it out. If you run the initial app you can see that it has a color picker dialog button (when you press it that window appears). How can I make something like that?

I tried using this(as he says on that website) :

ColorPickerDialog colorPickerDialog = new ColorPickerDialog(this, initialColor, new OnColorSelectedListener() {

    public void onColorSelected(int color) {
        // do action


but I get a lot of errors. I only copied those 2 java files, nothing else. Not even the layout or something like that. What else should I copy in order to make it work ? I’m using Android Studio

I’ve been trying to solve this for a long time … but however I try I won’t get it done. Thank you :smiley: