Hello,
I'd like to ask about how to proper handle progressDialog in
Thread, since getting the error from subject.
My code:
Thread logThread = new Thread()
{
String result = new String();
@Override
public void run()
{
Looper.prepare();
try
{
result = ofsomesomeoperation();
}
catch (NoSuchAlgorithmException e)
{
}
logHandler.post(new Runnable()
{
public void run()
{
if (result.equals(something1))
{
dialogLogProg.dismiss();
showDialog(dialog_something1);
}
else
{
dialogLogProg.dismiss();
Intent newint = new Intent(Example.this,NewInt.class);
startActivity(newint);
Example.this.finish();
}
}
});
Looper.loop();
}
};
logThread.start();
Problem occurs when a dialog progress appears and I change my phone
orientation, it freezes and crashes, on line with dismiss(). I've seen
some
discussion about this but my English is poor, so I hope for some
running
examples on my code. Thank you.
Greetings.
--
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