package hh.dejsem.hack;

import android.app.AlertDialog;
import android.app.Dialog;
import android.app.DialogFragment;
import android.os.Bundle;

import hh.lib.D;

public class HackDialogFragment extends DialogFragment {
	/*----------------------------------------------------------
	* test dialog
	* ----------------------------------------------------------*/
	D d = null;
	String title, message;
    /*----------------------------------------------------------*/

	void testDialog(D d, String title, String message) {
		this.d = d.klon(this);
		this.title = title;
		this.message = message;
	}

	@Override
	public Dialog onCreateDialog(Bundle savedInstanceState) {
		if(d == null) { dismiss(); return null; }
		AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());
		builder
				.setCancelable(true)
				.setTitle(title)
				.setItems(new String[] {"bla bla", "ble ble", "bleeeeeeeeee"}, null)
				.setPositiveButton("OK", null);
		AlertDialog dialog = builder.create();
		return dialog;
	}
}
