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. Bluetooth on Android 2.0 emulator

Hello,

Have anyone success on trying bluetooth stuff on android 2.0 emulator?
If not, could anyone get an android 2.0 image that can run on ADP1 and
supports bluetooth?

thanks in advance

-- 

2. How to begin :D

Hi *, I've been working with the emulator for a while, now I would
work with a "real device".

I'm looking for a device with:
 - touchscreen (possibly multi touch)
 - gps
 - wifi
 - usb host capability
 - support for SD or CF

I'm not interested in phone features like SMS, MMS, UMTS or similar.

Tkz :D

-- 

3. Can't start apps in emulator

4. Getting IM Ids from the contact database in 2.0

5. KeyboardView issue

6. Android sms api

7. Droid doesn't show up as target