I hav an application where I have an TabActivity and which have 2tabs(each tab as an activity) First tab(an activity) loads data from internet. So I want there a progressdialog until the 1st tab(an activity) loads data from internet.
ProgressDialog.show(TabHostActivity.this, "Working..", "Downloading Data...",true);
pd.dismiss();
only this much code i have which not give satisfaction please anybody tell me what i write to show a progressdialog until it download the data. (means i hav to use thread). Please give me answer along with code Thank you
You should implement AsyncTask inside the First Tab activity, Asynctask is known as PainLess Threading.
Just go through the above 2 links and then do as follows:
In tabGroupActivity ,use progressDialog in the folllowing way( If your activity is the sub Activity of any tabhost):
try this, and one more thing implement ProgressDialog using threads: see this for help : How to get a progress bar on button click?
Hope this will give you some idea on the topic.