title: Changing image view background dynamically
body: <p>I have a a set of 10 imageviews in my layout. I have given them sequential id's also as</p>
  
  <pre><code>android:id="@+id/pb1"
  
  android:id="@+id/pb2"
  </code></pre>
  
  <p>Now I want to change background dynamically. </p>
  
  <pre><code>    int totalPoi = listOfPOI.size();
      int currentPoi = (j/totalPoi)*10;
      for (i=1;i&lt;=currentPoi;i++) {
            imageview.setBackgroundResource(R.drawable.progressgreen);
  }
  </code></pre>
  
  <p>Now inside the for loop I want to set the image view background dynamically. i,e if the currentpoi value is 3, background of 3 image views should be changed. What ever the times the for loop iterates that many image view's background should be changed. Hope the question is clear now.</p>
  
  <p>Note : I have only 1 image progressgreen that need to be set to 10 image views</p>