我有两个课程,一个显示图像,下一个仅在背景中加载图像,但问题是第二个课程需要setProgressBarIndeterminateVisibility(false)
从第一个课程开始,我不知道该怎么做。
我的第一堂课:
public class Galeria extends Activity {
requestWindowFeature(Window.FEATURE_INDETERMINATE_PROGRESS);
setContentView(R.layout.activity_galeria);
setProgressBarIndeterminateVisibility(true);
...
}
我的第二课:
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);
}