Hi ,
I am displaying Confirmation type dialog box. I want to pause
execution of that thread until answer is provided by user, but since this
AlertDialog works asynchronously, I am facing problems in blocking that
thread but displaying AlertDialog and continue execution on answer. I tried
using wait notify between threads but didn't worked. Anybody Used
AlertDialog.wait() method ?
I am pasting my code here too,
AlertDialog.Builder builder = new
AlertDialog.Builder(Demo.ctxt);
builder.setMessage("Do
you want to Trust testgenservercert")
.setCancelable(false)
.setPositiveButton("Yes", new DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog, int id) {
//uiThread.notify();
System.out.println("Positive Button clicked");
}
})
.setNegativeButton("No", new DialogInterface.OnClickListener() {
public void
onClick(DialogInterface dialog, int id) {
//uiThread.notify();
System.out.println("Negative Button clicked");
}
});
/*uiThread = Thread.currentThread();
AlertDialog alert =
builder.create();
alert.show();
synchronized(alert) {
alert.wait();
}*/
--
...Swapnil
|| Hare Krishna Hare Krishna Krishna Krishna Hare Hare ||
|| Hare Rama Hare Rama Rama Rama Hare Hare ||
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en