title: How to get the instances of all views created by an adapter?
body: <p>I have a <code>ArrayAdapter</code> for a <code>GridView</code>, As you can see in the code I populate the <code>GridView</code> using the <code>getView</code> method with a custom view that called: <code>GridViewCell</code>.</p>
  
  <p>Now on a click of this custom view there is a <code>FlipAnimation</code> method run that works great for the clicked view. What I want to achieve is to run the same animation method for all the other custom views currently in the adapter, so I need to get the instances of all the other views (there are 4 view in the adapter, so I need to get instances of the other 3).</p>
  
  <pre><code>public class AnswersGridAdapter extends ArrayAdapter&lt;Answer&gt;
  {   
  private static final String TAG = AnswersGridAdapter.class.getSimpleName();
  private ArrayList&lt;Answer&gt; answersList;
  private Context context;
  private MainActivity activity;
  private QuestionGridFragment fragment;
  private View view;
  
  public AnswersGridAdapter(QuestionGridFragment fragment, Context context, int textViewResourceId, ArrayList&lt;Answer&gt; answersList) 
  {
      super(context, textViewResourceId, answersList);
       this.answersList = new ArrayList&lt;Answer&gt;();
       this.answersList.addAll(answersList);
       this.context = context;
       this.activity = (MainActivity)context;
       this.fragment = fragment;
  }
  
  public View getView(final int position, View convertView, ViewGroup parent)
  {
      final View view = new GridViewCell(context);
  
      if (answersList.get(position).isChecked())
      {
          ((GridViewCell)view).FlipToBackWithoutAnimation();
      }
  
      view.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) 
          {
              ((GridViewCell)view).FlipAnmiation();
              if (answersList.get(position).isChecked())
              {
                  answersList.get(position).setChecked(false);
              }
              else
              {
                  answersList.get(position).setChecked(true);
              }
  
              activity.getEstimatedCostTextView().setText(String.valueOf(activity.getEstimatedCost()));
              fragment.flipOtherChosenAnswer(position);
          }
      });
  
      ((GridViewCell)view).setTextToTitleTextView(answersList.get(position).getAnswerText());
      return view;
  }
  }
  </code></pre>
  
  <p>I was trying to do something like this:</p>
  
  <pre><code>public void flipOtherChosenAnswer(int position) 
  {
      int cellCount = answersAdapter.getCount();
      for (int i=0; i &lt; cellCount; i++ )
      {
              ((GridViewCell)answersAdapter.getView(i, null, null)).FlipAnmiation();
      }
  }
  </code></pre>
  
  <p>but that didn't help me. How can this be done?</p>