I have two class, one show images and the next only load images in background, but the problem is that the second class need to do setProgressBarIndeterminateVisibility(false)
from the first class, and I dont know ho to do it.
My first class:
public class Galeria extends Activity {
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.activity_galeria);
setProgressBarIndeterminateVisibility(true);
...
}
My Second class:
public class CargarImagenes extends AsyncTask<Object, Bitmap, Object> {
protected Object doInBackground(Object... params) {
other operations...
}
protected void onPostExecute(Object result) {
Galeria galeria = new Galeria();
// This is the problem!!
galeria.setProgressBarIndeterminateVisibility(false);
}