title: showing progressbar until image downloaded from server
body: <p>dear i am able to showing image from urls,means urls are stored in a an array and i have two button "next","back "for seeing image one after another when i click on  button image are downloaded from server as response  now i want to showing progress bar when image going downloade from server and when response come then progress bar hide automatically menas show progreebar untill response as a image not showin on screen and when image display progreebar activity finishes...so how to do this my piece of code for showing image one after another on button click are below...please modify in my code if possible bcoz i am new in android and  java as well..thans a lot in advance...</p>
  
  <pre><code>public class artspacedetailShowingNow extends Activity implements OnClickListener {
  private int imageCounter = 0;
  private ImageView imageLoader;
  private String[] imageList = {"http://www.artealdiaonline.com/var/artealdia_com/storage/images/argentina/directorio/galerias/ruth_benzacar/artistas/martin_di_girolamo._diosas/198915-1-esl-AR/MARTIN_DI_GIROLAMO._Diosas.jpg","http://www.artealdiaonline.com/var/artealdia_com/storage/images/argentina/directorio/galerias/ruth_benzacar/artistas/jorge_macchi._la_espera/198929-1-esl-AR/JORGE_MACCHI._La_espera.jpg","http://www.artealdiaonline.com/var/artealdia_com/storage/images/argentina/directorio/galerias/ruth_benzacar/artistas/leon_ferrari._hongo_nuclear/198950-1-esl-AR/LEON_FERRARI._Hongo_Nuclear.jpg","http://www.artealdiaonline.com/var/artealdia_com/storage/images/argentina/directorio/galerias/ruth_benzacar/artistas/martin_sastre._fiebre/198922-1-esl-AR/MARTIN_SASTRE._Fiebre.jpg"};
      public void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.showingnow);
         imageLoader = (ImageView) findViewById(R.id.imageLoader);
       Button next = (Button) findViewById(R.id.next);
      Button back = (Button) findViewById(R.id.back);
      next.setOnClickListener(this);
      back.setOnClickListener(this);
      back.setEnabled(false);
      this.loadImage(imageList[imageCounter]);
  
  }
  @Override
   public void onClick(View v)
  {
  String imagePath = null;
    switch (v.getId())
  {
  case R.id.next:
      Log.i("Tag","tag");
      if(imageCounter &lt; imageList.length)
      {
          imageCounter++;
          imagePath = imageList[imageCounter];
          if (imageCounter==(imageList.length)-1)
          {
              { 
                  Button next=(Button)findViewById(R.id.next); 
                 next.setEnabled(false); 
               }
          }
          else
          {
              Button back=(Button)findViewById(R.id.back); 
              back.setEnabled(true); 
  
          }
      }
      break;
  case R.id.back:
      if(imageCounter &gt; 0)
      {
          imageCounter--;
          imagePath = imageList[imageCounter];
          if (imageCounter==0) 
          { 
              Button back=(Button)findViewById(R.id.back); 
              back.setEnabled(false); 
  
          }
          else
          {
              Button next=(Button)findViewById(R.id.next); 
               next.setEnabled(true);
  
          }
      }
      break;
  }
  this.loadImage(imagePath);
  }
  private void loadImage(String imagePath)
  {   
    try {
        URL aURL = new URL(imagePath);
        URLConnection conn = aURL.openConnection();
        conn.connect();
        InputStream is = conn.getInputStream();
        BufferedInputStream bis = new BufferedInputStream(is);
       Bitmap bm = BitmapFactory.decodeStream(bis);
  
        imageLoader.setImageBitmap(bm);
        imageLoader.setImageBitmap(bm);
    } 
  
  }
  </code></pre>