Search in sources :

Example 1 with OnAmbilWarnaListener

use of yuku.ambilwarna.AmbilWarnaDialog.OnAmbilWarnaListener in project KeepScore by nolanlawson.

the class DialogHelper method showCustomColorDialog.

private static void showCustomColorDialog(Context context, int initialColor, final Callback<PlayerColor> onColorChanged, final Runnable onColorSelected) {
    AmbilWarnaDialog dialog = new AmbilWarnaDialog(context, initialColor, new OnAmbilWarnaListener() {

        @Override
        public void onOk(AmbilWarnaDialog dialog, int color) {
            onColorChanged.onCallback(new CustomPlayerColor(color));
            onColorSelected.run();
        }

        @Override
        public void onCancel(AmbilWarnaDialog dialog) {
        // do nothing
        }
    });
    dialog.show();
}
Also used : AmbilWarnaDialog(yuku.ambilwarna.AmbilWarnaDialog) CustomPlayerColor(com.nolanlawson.keepscore.helper.PlayerColor.CustomPlayerColor) OnAmbilWarnaListener(yuku.ambilwarna.AmbilWarnaDialog.OnAmbilWarnaListener)

Aggregations

CustomPlayerColor (com.nolanlawson.keepscore.helper.PlayerColor.CustomPlayerColor)1 AmbilWarnaDialog (yuku.ambilwarna.AmbilWarnaDialog)1 OnAmbilWarnaListener (yuku.ambilwarna.AmbilWarnaDialog.OnAmbilWarnaListener)1