I am making to show progressbar on postexecute and to be not visible in postExecute, and it works, but makes the app to work very slow, what is the reason is there any simple way to make it work normal(not slowly)? This is my code:
bar = (ProgressBar) this.findViewById(R.id.progressBar);
getInfo extends AsyncTask<void, void, void>{
protected void onPreExecute() {
bar.setVisibility(View.VISIBLE);
}
protected void doInBackground(String... params)
do smth}
protected void onPostExecute(Boolean results) {
bar.setVisibility(View.GONE);
}
}