package hh.dejsem.hack;

import android.content.DialogInterface;
import android.os.Bundle;

import hh.dejsem.Act;
import hh.lib.NoticeDialogFragment;

public class HackNotifDialogAct extends Act implements DialogInterface.OnClickListener {

	static int cntr = 0;

	@Override
	public void onCreate(Bundle b) {
		super.onCreate(b);
		new Vlákno(cntr++, this).start();
		new Vlákno(9000 + cntr++, this).start();
	}

	@Override
	public void onClick(DialogInterface dialog, int which) {
		d.l("finishing...");
		finish(); }

	class Vlákno extends Thread {
		int cntr;
		DialogInterface.OnClickListener lstnr;
		Vlákno(int cntr, DialogInterface.OnClickListener lstnr) {
			this.cntr = cntr;
			this.lstnr = lstnr;
		}
		public void run() {
			new NoticeDialogFragment().display(d, "HACK["+(cntr)+"]", "candy is dandy", lstnr);
		}
	}
}
