// Path: gearshift/src/main/java/org/sugr/gearshift/ui/util/colorpicker/ColorPickerSwatch.java
// public interface OnColorSelectedListener {
// 
//     /**
//      * Called when a specific color square has been selected.
//      */
//     public void onColorSelected(int color);
// }


import org.sugr.gearshift.ui.util.colorpicker.ColorPickerSwatch.OnColorSelectedListener;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ProgressBar;
import org.sugr.gearshift.R;
        }
    }

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        final Activity activity = getActivity();

        View view = LayoutInflater.from(getActivity()).inflate(R.layout.calendar_color_picker_dialog, null);
        mProgress = (ProgressBar) view.findViewById(android.R.id.progress);
        mPalette = (ColorPickerPalette) view.findViewById(R.id.color_picker);
        mPalette.init(mSize, mColumns, this);

        if (mColors != null) {
            showPaletteView();
        }

        mAlertDialog = new AlertDialog.Builder(activity)
            .setTitle(mTitleResId)
            .setView(view)
            .create();

        return mAlertDialog;
    }

    @Override
    public void onColorSelected(int color) {
        if (mListener != null) {
            mListener.onColorSelected(color);
        }

// Path: gearshift/src/main/java/org/sugr/gearshift/ui/util/colorpicker/ColorPickerSwatch.java
// public interface OnColorSelectedListener {
// 
//     /**
//      * Called when a specific color square has been selected.
//      */
//     public void onColorSelected(int color);
// }


// Path: gearshift/src/main/java/org/sugr/gearshift/ui/util/colorpicker/ColorPickerDialog.java
import org.sugr.gearshift.ui.util.colorpicker.ColorPickerSwatch.OnColorSelectedListener;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ProgressBar;
import org.sugr.gearshift.R;

        }
    }

    @Override
    public Dialog onCreateDialog(Bundle savedInstanceState) {
        final Activity activity = getActivity();

        View view = LayoutInflater.from(getActivity()).inflate(R.layout.calendar_color_picker_dialog, null);
        mProgress = (ProgressBar) view.findViewById(android.R.id.progress);
        mPalette = (ColorPickerPalette) view.findViewById(R.id.color_picker);
        mPalette.init(mSize, mColumns, this);

        if (mColors != null) {
            showPaletteView();
        }

        mAlertDialog = new AlertDialog.Builder(activity)
            .setTitle(mTitleResId)
            .setView(view)
            .create();

        return mAlertDialog;
    }

    @Override
    public void onColorSelected(int color) {
        if (mListener != null) {
            mListener.onColorSelected(color);
        }

        if (getTargetFragment() instanceof OnColorSelectedListener) {