you can use the ProgressDialog class using the help of the Handler class. This way you can achieve what you want.
progDailog = ProgressDialog.show(loginAct,"Process ", "please wait....",true,true); new Thread ( new Runnable() { public void run() {
source share