title: What is "convertView" parameter in ArrayAdapter getView() method
body: <p>Can someone tell me what the <code>convertView</code> parameter is used for in the <code>getView()</code> method of the <code>Adapter</code> class?</p>
  
  <p>Here is a sample code take from <a href="http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/" rel="noreferrer">here</a>:</p>
  
  <pre><code>@Override
  public View getView(int position, View convertView, ViewGroup parent) {
      View v = convertView;
      if (v == null) {
          LayoutInflater vi = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          v = vi.inflate(R.layout.row, null);
      }
      Order o = items.get(position);
      if (o != null) {
          TextView tt = (TextView) v.findViewById(R.id.toptext);
          TextView bt = (TextView) v.findViewById(R.id.bottomtext);
          if (tt != null) {
              tt.setText("Name: "+o.getOrderName());                            }
          if(bt != null){
              bt.setText("Status: "+ o.getOrderStatus());
          }
      }
      return v;
  }
  </code></pre>
  
  <p>What should we pass via <code>convertView</code>? </p>
  
  <p>What I've found, <a href="http://developer.android.com/reference/android/widget/Adapter.html" rel="noreferrer">take from here</a>:</p>
  
  <blockquote>
    <p>Get a View that displays the data at the specified position in the
    data set. You can either create a View manually or inflate it from an
    XML layout file. When the View is inflated, the parent View (GridView,
    ListView...) will apply default layout parameters unless you use
    inflate(int, android.view.ViewGroup, boolean) to specify a root view
    and to prevent attachment to the root.</p>
    
    <p><strong>Parameters</strong></p>
    
    <p><em>position</em> -- The position of the item within the adapter's data set of the item whose  view we want.</p>
    
    <p><em>convertView</em> -- The old view to reuse, if possible. Note: You should check that this view is non-null and of an appropriate type before
    using. If it is not possible to convert this view to display the
    correct data, this method can create a new view.</p>
    
    <p><em>parent</em> -- The parent that this view will eventually be attached to Returns</p>
    
    <p><em>returns</em> -- A View corresponding to the data at the specified position.</p>
  </blockquote>