title: How to set background for several views in gridView?
body: <p>I'm writing an  application which has a gridView. This gridview consists of several imageViews. I'm able to set the background for a clicked item. But I need to set the background for several items.</p>
  
  <p>The following code didn't help me:   </p>
  
  <pre><code>    gridview.setOnItemClickListener(new OnItemClickListener() {
          public void onItemClick(AdapterView&lt;?&gt; parent, View v, int position, long id) {
          for(int eachCoordinate: coordinates){
              gridview.getChildAt(eacheachCoordinate).setBackgroundResource(R.drawable.point);
  }
  </code></pre>