Tuesday, October 18, 2011

How to run a Runnable thread in Android?

How to run a Runnable thread in Android?...

 final ProgressDialog progressDialog = 
ProgressDialog.show(InboxActivity.this, "","Loading...", true, true); 
Handler handler=new Handler();
Runnable r=new Runnable()
{
    public void run() 
    {
       your method here();
          progressDialog.dismiss(); 
       
    }
};
handler.postDelayed(r, 1000);

 

1 comment:

Check out this may be help you

Related Posts Plugin for WordPress, Blogger...