Saturday, January 21, 2012

How to display a progress message aka "hourglass" in Android around long running tasks, really moving that long running tasks to a different thread but obstructing your activity with a curtain from progress so messages are processed and everything shows. Here is a snippet:


ProgressDialog dialog = ProgressDialog.show(this, "Title",
"Your message", true);
final Handler handler = new Handler() {
public void handleMessage(Message msg) {
dialog.dismiss();

}
};

Thread export = new Thread() {
public void run() {

// LONG TASK CALL
// callLongTask();

handler.sendEmptyMessage(0);
}
};
export.start();

33 comments:

Anonymous said...

good

Anonymous said...

ただしこの は通常 として変更 レプリカ 製品は になる
にくく お知らせ。 彼女は 本当にすぐに の認識 彼女
のための眼識 構築。 ことができます今 誇示 スタイリッシュな
トートバッグ にいつでも あらゆる機会。 ブラックは、おそらく 彼女 の好きなファッション
色または純度。

Take a look at my web page: UGG Boots

oakleyses said...

lululemon outlet, ray ban, nike roshe, mont blanc, converse shoes, karen millen, michael kors, roshe run, nfl jerseys, nike huarache, birkin bag, beats by dre, mac cosmetics, hogan, louboutin, converse pas cher, ray ban pas cher, montre pas cher, michael kors, vans, north face jackets, lululemon, oakley pas cher, north face outlet, reebok outlet, michael kors, nike free, ralph lauren, nike trainers, louis vuitton, louis vuitton, hollister, hermes, timberland, abercrombie and fitch, supra shoes, new balance shoes, juicy couture outlet, mulberry, air max, lancel, hollister, north face, rolex watches, juicy couture outlet, burberry, wedding dresses, new balance pas cher, abercrombie and fitch, nike air max

dody Love said...

شركة تسليك المجارى بالرياض
شركة شفط البيارات بالرياض
شركة تنظيف الخزانات بالرياض
شركة عزل الاسطح بالرياض
شركة تنظيف الشقق بالرياض
شركة تنظيف الفلل بالرياض
شركة رش المبيدات بالرياض
شركة مكافحة النمل الابيض بالرياض
شركة غسيل السجاد بالرياض
شركة كشف تسربات المياه بالرياض
شركة نقل الاثاث بالرياض
شركة رش مبيدات بأبها

dody Love said...

شركة تنظيف بجده
شركة تنظيف شقق بجده
شركة تنظيف فلل بجده
شركة تنظيف قصور بجده
شركة تنظيف خزانات بجده
شركة عزل اسطح بجده
شركة عزل خزانات بجده
شركة تنظيف مجالس لجده
شركة تنظيف مساجد بجده
شركة مكافحة النمل الابيض بجده
شركة رش مبيدات بجده
مكافحة صراصير المطبخ
شركة نقل اثاث بجده
شركة نقل عفش بجده
شركة مكافحةالنمل الابيض بأبها

dody Love said...

شركة تخزين عفش بالرياض
شركة تسليك مجارى بالرياض
شركة تنظيف بالرياض
شركة تنظيف بيارات بالرياض
شركة تنظيف خزانات بالرياض
شركة تنظيف شقق بالرياض
شركة تنظيف فلل بالرياض
شركة رش مبيدات بالرياض

mmjiaxin said...

marc jacobs
nike foamposite
vans shoes
calvin klein outlet
ralph lauren outlet
michael kors outlet online
swarovski crystal
ferragamo outlet
cheap nike shoes
michael kors handbags sale
oakley,occhiali oakley,oakley italia,oakley occhiali,oakley sunglasses
moncler outlet store
the north face outlet
michael kors factory online
ralph lauren uk
nike air max
asics,asics israel,asics shoes,asics running shoes,asics israel,asics gel,asics running,asics gel nimbus,asics gel kayano
longchamp outlet
michael kors wallet sale
michael kors outlet
mm1202

Unknown said...


عزل ايطح بالخبر
عزل خزانات بالخبر
كشف تسربات بالخبر
مكافحة البق بالخبر
مكافحة النمل الابيض بالخبر
مكافحة حشرات بالخبر
شركة نقل اثاث بالخبر
شركة نقل عفش بالخبر
شركة تسليك بالقطيف
شركة تنظيف بالظهران
شركة تنظيف بيوت بالظهران
شركة تنظيف خزانات بالظهران
شركة تنظيف سجاد وموكيت بالظهران
شركة تنظيف شقق بالظهران

mmjiaxin said...

Cheap Oakley Sunglasses
nike huaraches
http://www.cheapauthenticjordans.us.com
mlb jerseys authentic
fitflop shoes
oakley sunglasses,oakley vault,oakley sunglasses cheap,oakleys,oakley.com,sunglasses outlet,cheap oakley
http://www.christian-louboutin-outlet.uk
tiffany & co
michael kors outlet online
mlb jerseys authentic
cheap air jordans
tiffany and co
michael kors outlets
nfl jerseys
michael kors purses
http://www.jordansforcheap.us.com
http://www.michaeljordanshoes.us.com
nike huarache
ralph lauren online,cheap ralph lauren
http://www.kobesneakers.com
gg

Unknown said...

valentino sandals
jimmy choo shoes
giuseppe zanotti sneakers
valentino slingbacks
valentino ballerinas
valentino shoes
giuseppe zanotti sale
valentino pumps
valentino bags
giuseppe shoes
valentino rockstud shoes
valentino flats
valentino boots
Valentino Shoes Sale
giuseppe zanotti boots
valentino sneakers
giuseppe zanotti sale
http://www.valentinorockstudshoessale.com
jimmy choo sale
red bottoms shoes on sale
louboutin outlet online
red sole shoes christian louboutin
christian louboutin sale
jimmy choo boots
cheap louboutin shoes
christian louboutin outlet
red bottom shoes for women
jimmy choo outlet
christian louboutin shoes
red bottom shoes christian louboutin
authentic christian louboutin outlet

chenlili said...

true religion sale
kevin durant 8 shoes
coach factory outlet online
ugg outlet
louis vuitton handbags
cheap air jordans
golden state warriors jerseys
uggs on sale
michael kors handbags
christian louboutin wedding shoes
moncler coats
ugg boots
louis vuitton
nike tn pas cher
rolex watches
rolex watches
toms sale
ugg boots
curry 3
christian louboutin
coach outlet store online
canada goose pas cher
cheap toms
louis vuitton outlet
rolex watches
ugg boots on sale
christian louboutin outlet
coach outlet
adidas running shoes
jordan retro 4
uggs sale
cincinnati bengals jerseys
uggs pas cher
true religion uk
ray ban sunglasses
uggs on sale
ugg boots
canada goose
chenlili20160829

chenlina said...

ugg boots paris
louis vuitton outlet
minnesota vikings jerseys
coach outlet
washington wizards jerseys
fitflops sale clearance
ray ban sunglasses
cheap oakley sunglasses
ugg boots
oakley sunglasses
chenlina20161027

jeje said...

chrome hearts
adidas tubular x
longchamp bags
adidas stan smith women
cheap basketball shoes
michael kors outlet online
irving shoes
michael kors outlet
fitflops sale
longchamp handbags

Sơn Epoxy Tín Phát - Nhà thầu số 1 miền Bắc said...

It is a great article. You will surely like this also because it is a great stufff

run3unblockedgame.com

alicetaylor said...

Thank you for such a sweet tutorial - all this time later, I've found it and love the end result. I appreciate the time you spent sharing your skills.

potaup

Kay said...

That's a workable solution.

Admin said...

Thank you for this very useful health article

Cara Mengobati Radang Amandel
Cara Mengatasi Perut Kembung
Cara Mengobati Radang Sendi

chenlili said...

true religion jeans
juicy couture outlet
louis vuitton handbags
off-white clothing
tory burch
flops
replica watches
louis vuitton outlet
polo ralph lauren
nike huarache shoes
20185.21chenjinyan

chenmeinv0 said...

jordan xx9
true religion
jordan
nike air max 90
iphone cases
air max 90
michael kors uk
kate spade
replica watches
michael kors outlet
2018.6.1xukaimin

jeje said...

moncler online
air jordan shoes
moncler online outlet
nike factory store
oakley sunglasses wholesale
pandora charms outlet
rayban sunglasses
jaguars jersey
super dry
cardinals jersey

Anonymous said...

Tangki Panel
Tangki Fiberglass
Jual Septic Tank
Tangki Kimia
Jual Talang Fiber
Jual Rotameter
jual mesin ro
Jual Botol Plastik Agro

Jual Botol Plastik Murah

Unknown said...

0728jejeLes groupes jogging air jordan femme numériques sont caractérisés par la diversité nike internationalist femme beige blanche culturelle qui met en vedette nike air huarache run id femme des professionnels uniques, des nationalités, des air france jordan address entreprises et des hommes et running asics gel nimbus femme des femmes qui hachent chaussures asics homme pas cher dans différentes cultures d'entreprise (Bauer et air jordan pour jouer au basket Erdogan, 2009). Point gardes avec nike baskets court royale suede la vitesse et la nike air jordan femme pas cher force de finir sur la jante.

PalaPala said...

Jordan 11
Jordan 11
Pandora Jewelry Official Site
Retro Jordan 11
Yeezy boost
Jordan 4
Air Max 270
Air Jordan 9
Kyrie 3 Shoes
Red Bottom Shoes For Women
Latrice20190217

PalaPala said...

Jordan Retro
Jordan 9
Nike Air Max 270
Kyrie Irving Shoes
Pandora Jewelry Official Site
Pandora Charms
Red Bottom Shoes For Women
Air Jordan 11
Jordan 4
Latrice20190328

PalaPala said...

Yeezy boost 350 v2
Pandora Jewelry
Jordan Retro 11
Pandora Outlet
Air Max 270
Air Jordan 9
Kyrie Irving Shoes
Air Jordan 11
Red Bottom Shoes
Latrice20190409

Bilibili said...

Air Jordan Retro 11
Pandora
Jordan Retro
Jordan 4
Yeezy boost 350 v2
Air Jordan 9
Kyrie 3 Shoes
Red Bottom Shoes For Women
Jordan 11 For Sale
Pandora Jewelry
Rodney20190416

PalaPala said...

Yeezy boost 350 v2
Pandora Jewelry
Kyrie Irving Shoes
Jordan 9
Pandora Jewelry Outlet
Jordan Retro
Pandora Jewelry
Red Bottom Shoes For Women
Air Jordan 11
Jordan 4
Latrice20190424

yanmaneee said...

nba jerseys
hermes
custom baseball jerseys
valentino shoes
nike hyperdunk
michael kors outlet
yeezy boost 350
jordan 6
goyard bags
air max 2019

biggboss13online said...

Aw, this was a very nice post. Taking the time and actual effort to produce a superb article… but what can I say… I procrastinate a whole lot and never manage to get anything done.
Yeh Rishtey Hain Pyaar Ke All Episodes

Yeh Hai Chahatein Full Episode said...

It’s a really unique and informative article. Great work! Much appreciated, keep posting many more…. I added it to my bookmark website list and will be checking back in the near future.

mai said...


مؤسستنا الصرح جروب لجميع الخدمات
ترميم الحمام 0534547049
ترميم البيت 0534547049
ابغي شركة ترميم منازل 0534547049
ترميم حمامات بالرياض 0534547049
ترميم منازل قديمة 0534547049
ترميمات مباني بالرياض 0534547049
ترميم بيوت 0534547049
ترميم شقق 0534547049
ترميم فلل 0534547049
ترميم منزل 0534547049

Anonymous said...

A lista de participantes foi concluída e revelada assistir big brother brasil online em várias fontes on-line, também mencionamos suas informações aqui no, Fique ligado para mais notícias, atualizações e completos

tisme said...

t9e48u4y43 t2y34z9e69 n0j85u1v22 i1t31z7i37 p0i49b9t69 t3y87b4t67