title: How to change the imageview resource in gridview?
body: <p>I have two GridView</p>
  
  <pre><code>     &lt;GridView
          android:id="@+id/gridView"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_marginBottom="2dp"
          android:background="#59A9D2" &gt;
      &lt;/GridView&gt;
  
      &lt;GridView
          android:id="@+id/gridViewMain"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_below="@+id/gridView"
          android:background="#1E98D5" &gt;
      &lt;/GridView&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>First grid view holds 25 imageView elements.</p>
  
  <p>Second grid view holds 5 images (these 5 images are from the 25 images from the first grid view images)</p>
  
  <p>User can able to click only on the images of first grid view. user need to find out the second grid view images in first grid view.</p>
  
  <p>when the user successfully make a correct click. i want the that image to turn into a "right green tick" image in the second grid how to do this onitemclicklistener of first grid view.</p>
  
  <p>mGridView.setOnItemClickListener(new OnItemClickListener() {</p>
  
  <pre><code>        @Override
          public void onItemClick(AdapterView&lt;?&gt; parent, View view,
                  int position, long id) {
              // TODO Auto-generated method stub
              // ToastMessage(position);
  
              if ((mRandomIDList.toArray()[position] == mSolutionList
                      .toArray()[tempposition])) {
  
                  Score = Score + (TimeLeft * (tempposition + 1));
                  mScoreTextView.setText("Score: " + Score);
                  //mGridViewMain.getAdapter().getView(tempposition, checkImageView, null);
                  //mGridViewMain.notifyAll();
                  if(mMediaPlayer2.isPlaying()){
                  mMediaPlayer2.stop();
                  }
                  mMediaPlayer2.start();
                  tempposition++;
                  //Marking the try one image in solution grid view
                  if (tempposition == 5) {
                      mCountDownTimer.cancel();
                      Intent successIntent = new Intent(mContext,
                              SuccesActivity.class);
                      successIntent.putExtra("last-score", Score);
                      successIntent.putExtra("Game Level", PLAY_LEVEL);
                      startActivity(successIntent);
                      mMediaPlayer.stop();
                      mMediaPlayer.reset();
                      mMediaPlayer.release();
                      finish();
                  }
              } else {
                  mCountDownTimer.cancel();
                  GameOver(mContext, Score);
                  mMediaPlayer.stop();
                  mMediaPlayer.reset();
                  mMediaPlayer.release();
                  finish();
              }
  </code></pre>