Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 1007: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781

Strict Standards: Non-static method utf_normalizer::nfc() should not be called statically in /www/htdocs/w006661d/anddev/includes/utf/utf_tools.php on line 1781
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4362: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4364: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4365: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4366: Cannot modify header information - headers already sent by (output started at /includes/utf/utf_tools.php:1781)
anddev.org • View topic - Problem with ProgressDialog

Problem with ProgressDialog

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

Problem with ProgressDialog

Postby rustyventure » Fri Mar 13, 2009 10:55 pm

(Note: I posted this to android-beginners this morning, but no replies yet, so I'm trying here too :) )

Hi, Everyone:

I'm having some trouble displaying a ProgressDialog. Basically, I want
to show a progress "popup" when a user presses a button in my app.
Here's the code:

Code: Select all
OnClickListener updateButtonPressed = new OnClickListener(){
        // @Override
        public void onClick(View arg0) {
                //Run this on a new thread
                runOnUiThread(new Runnable() {
                        @Override
                        public void run() {
                                // TODO Auto-generated method stub
                                ProgressDialog pd = null;
                                pd = ProgressDialog.show(myContext, "please wait", "updating",
true, false);
                                /*
                                 run a bunch of code ...
                                */
                                pd.dismiss();
                        }
                });
        }
    };


The code runs fine, but the popup never appears. I'm using Eclipse as
my development environment, and it logs no errors. As far as I can
tell (and from some google searches), the ProgressDialog should work,
so I'm stumped. Any ideas?
rustyventure
Freshman
Freshman
 
Posts: 5
Joined: Wed Dec 10, 2008 12:14 am

Top

Postby MrSnowflake » Sat Mar 14, 2009 10:23 am

That's probably because /* run a bunch of code */ should be in a separate thread.
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: Google [Bot] and 4 guests