ImagView not updating with bitmap?
<p>why my imageview is not updating in the for loop,only the image from last url is showing in the imageview not all the images,what i am doing wrong? </p>

<pre><code>public class LoadImageActivity extends Activity {
   int i=0;
   ImageView image_view;
   Bitmap bitmap;

String  [] imageLocation={
                          "http://wallbase1.org/thumbs/rozne/thumb-499842.jpg",
                          "http://ns3002439.ovh.net/thumbs/rozne/thumb-2493796.jpg",
                          "http://ns3002439.ovh.net/thumbs/rozne/thumb-2486664.jpg"};  

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
   image_view = (ImageView)findViewById(R.id.imageview);

   while(i&lt;2)
    {

  bitmap=loadImage(imageLocation[i]);
    image_view.setImageBitmap(bitmap);

   Animation rotate = AnimationUtils.loadAnimation(LoadImageActivity.this, R.anim.rotate);
     findViewById(R.id.imageview).startAnimation(rotate);
     i++;

        }

 }

public  Bitmap loadImage(String image_location){

      URL imageURL = null;

      try {
          imageURL = new URL(image_location);
        } 

      catch (MalformedURLException e) {
          e.printStackTrace();
        }

      try {
          HttpURLConnection connection= (HttpURLConnection)imageURL.openConnection();
          connection.setDoInput(true);
          connection.connect();
          InputStream inputStream = connection.getInputStream();


          bitmap = BitmapFactory.decodeStream(inputStream);//Convert to bitmap

      }
      catch (IOException e) {

           e.printStackTrace();
      }
    return bitmap;
 }
}
</code></pre>
