Thread and UI

July 20, 2012   ·   0 Comments



private Handler handler = new Handler();


		final ProgressDialog  autoProgressDialog2 = ProgressDialog.show(getParent(), "", LoopTekActivityPad.this.getResources().getString(R.string.progressWait), true);

        new Thread(new Runnable()
        { @Override
			public void run()
            {   //---hides the progress bar---
                handler.post(new Runnable() {
                    @Override
		    public void run() {

                    	////////

                    	dosomething();
                    	////////
                        if(autoProgressDialog2!=null){
                        	autoProgressDialog2.dismiss();
                         }
                    }
                });
            }
        }).start();
shareShare on FacebookShare on Google+Share on LinkedInEmail this to someonePrint this pageBuffer this pageDigg thisFlattr the authorShare on RedditPin on PinterestShare on StumbleUponShare on TumblrTweet about this on Twitter

By


Readers Comments (0)


You must be logged in to post a comment.

PowenKo’s Online Store

powenko_arduinoBook
Android7

Amazon

adsbygoogle

Recent Posts

Categories

Amazon