Text Invalide question

by Arun » Mon, 03 Aug 2009 04:24:20 GMT


Sponsored Links
 I've a button on my screen, that triggers a backend process that takes
15 secs. I would like to tell the user to wait for 15 secs when they
click, and update the status after the processing is done.

In order to achieve this, in my button OnClick method, I am doing the
following:
TextView tv = (TextView) getTextViewById();

tv.setText("Processing kicked off... Please wait for 15 secs");
tv.invalidate();
//call processor
tv.setText("Process Success");

But, in reality, all I see is the result of last setText call. No
intermediate updates are shown on the screen. Is invalidate the right
method to display the message? Should I be calling something else?

Thanks in advance for your help!
Arun.

--~--~---------~--~----~------------~-------~--~----~



Text Invalide question

by Jack Ha » Mon, 03 Aug 2009 07:34:55 GMT


 This link might help solve your problem:

     http://android-developers.blogspot.com/2009/05/painless-threading.html 

--
Jack Ha
Open Source Development Center
obilestick together

The views, opinions and statements in this email are those of
the author solely in their individual capacity, and do not
necessarily represent those of T-Mobile USA, Inc.



--~--~---------~--~----~------------~-------~--~----~


Sponsored Links


Text Invalide question

by peter » Mon, 03 Aug 2009 15:56:10 GMT


 In your code,  the main thread still running when you trigger a new
thread to run in background

obviously, you will see result of last setText call as "Process
Success"

you should callback main thread to reset status after your thread
finished.



--~--~---------~--~----~------------~-------~--~----~



Text Invalide question

by Umair Akbar » Tue, 04 Aug 2009 01:29:18 GMT


 Hey, acquaintances h r u
Break these bogs @ very fascinating
I hope u enjoy this bogs

www.safteytips007.blogspot.com
www.wonderfulbwp.blogspot.com
  www.technicaleducationbwp.blogspot.com








--~--~---------~--~----~------------~-------~--~----~



Text Invalide question

by Umair Akbar » Tue, 04 Aug 2009 01:29:29 GMT


 Hey, acquaintances h r u
Break these bogs @ very fascinating
I hope u enjoy this bogs

www.safteytips007.blogspot.com
www.wonderfulbwp.blogspot.com
  www.technicaleducationbwp.blogspot.com








--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. Create Quick Launch of WAP site

On my website I would like to offer browsers, from an Android device,
a button/link that would prompt the user to add the site as a quick
launch icon on their screen.  I'm sure this is easy to do but have not
seen any decent posts on this, though may have missed it.  Any
recommendations?

-- 

2. Hiding SMS notifications

Hello all,

I am working on a research project and I need to write an Android
application that is able to intercept SMS's and, according to their
content, route them to a web services without showing any alert.

I tried to register a broadcast receiver on the intent SMS_RECEIVED,
but the default SMS application is still notifying the SMS in the
notification bar. The only way to achieve what is manually disabling
the message notification from the default SMS application's menu.

I found that the "SMS Guard" application, available on the market, is
able to filter messages out without any notification, without touching
any default configuration (I wrote to the developer, no answer yet).

Any idea?

-- 

3. Get notification about service death

4. Eclipse layout editor can't find org.apache.http.client.ClientProtocolException

5. new scene ?

6. GridView Item Sizing

7. Device dashboard questions