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
[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 - Waiting for onProgressUpdate to finish

Waiting for onProgressUpdate to finish

Put your problem here if it does not fit any of the other categories.

Waiting for onProgressUpdate to finish

Postby Quipeace » Fri May 28, 2010 9:21 pm

Hello all,

I'm working on a prime number generator, but I ran into a small cosmetic problem.

I'm using an asynctask to run the prime generator, which uses onProgressUpdate(...) to then add the result to a textview, however, the thread runs so fast that the textview can't keep up with the changes.

What I'm looking for is a way to wait for onProgressUpdate to finish all it's tasks and then continue the thread.

Thank you all very much for your help ;)
Quipeace
Quipeace
Developer
Developer
 
Posts: 27
Joined: Tue Feb 23, 2010 4:00 pm

Top

Re: Waiting for onProgressUpdate to finish

Postby Quipeace » Sat May 29, 2010 7:08 am

Yes, I know about thread sleep, I'm using that to let the user set a pause after each prime, but I'm looking for something dynamic as I don't know what slower/faster phones will do, and I obviously want it as fast as possible.
Could I have onprogressreport return a variable I can wait for?

EDIT: Somewhat solved my problem, I'm now only refreshing the textview after 2000 primes (by default), as that's also increasing the performance.
Quipeace
Developer
Developer
 
Posts: 27
Joined: Tue Feb 23, 2010 4:00 pm

Top

Return to Other Coding-Problems

Who is online

Users browsing this forum: No registered users and 12 guests