dimanche 22 février 2015

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



I found the following link 'http://ift.tt/1And4TY'. I copied ColorPicker.java and ColorPickerDialog.java. I've been trying for a couple of hours 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



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

@Override
public void onColorSelected(int color) {
// do action
}

});
colorPickerDialog.show();`


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 will post the solution.(if I'll be able to find it )




Aucun commentaire:

Enregistrer un commentaire