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