android - How to control indeterminante ProgressBar which is not part of a ListView? -
android - How to control indeterminante ProgressBar which is not part of a ListView? - there , indeterminate progressbar rotates until listview content ready shown. both progressbar , listview part of same fragment . so coded progressbar made visisble , gone asynctask fetches content. mprogressbar = (progressbar) view.findviewbyid(r.id.progressbar); mprogressbar.getindeterminatedrawable() .setcolorfilter(getresources().getcolor(r.color.pink), porterduff.mode.multiply); new myasynctask().execute(); //then in asynctask private class myasynctask extends asynctask<void, integer, myadapter> { @override protected void onpreexecute() { mprogressbar.setvisibility(view.visible); } @override protected myadapter doinbackground(void... params) { //do stuff , homecoming loaded adapter homecoming adapter; } @override protected void onpostexecute(myadapter adapter) { mprogressbar.setvisibility(vie...