can anybody tell me how to use ProgressDialog in my Main thr

Put problem concerning Views, Layouts and other XML-Resources (like AndroidManifest) here.

can anybody tell me how to use ProgressDialog in my Main thr

Postby sarangkulkarni17 » Tue Mar 03, 2009 11:05 am

can anybody tell me how to use ProgressDialog in my Main thread.?
i created ProgressDialog as

myProgressDialog = ProgressDialog.show(Database.this,
"Please wait...", "", true);
causing>>
java.lang.RuntimeException: can't create handler inside thread that has not called Looper.prepare()

but i wrote Looper.prepare() still unable to display ProgressDialog

Thanks :)
sarangkulkarni17
Developer
Developer
 
Posts: 29
Joined: Fri Feb 13, 2009 10:00 am
Location: Pune

Top

Postby Emmanuel7 » Tue Mar 03, 2009 4:07 pm

It may be that your main thread is not the ui thread, and that it need to be.

In this case, you could update your progress bar in a runnable that you call with runOnUiThread.
Emmanuel7
Senior Developer
Senior Developer
 
Posts: 164
Joined: Fri Dec 12, 2008 2:17 am
Location: Paris

Postby MrSnowflake » Tue Mar 03, 2009 5:10 pm

* Not a tutorial... *sigh* MOVED *
User avatar
MrSnowflake
Moderator
Moderator
 
Posts: 1439
Joined: Sat Feb 16, 2008 3:11 pm
Location: Flanders, Belgium

Top

Return to View, Layout & Resource Problems

Who is online

Users browsing this forum: Exabot [Bot] and 6 guests