What is "convertView" parameter in ArrayAdapter getView() method
<p>Can someone tell me what is <code>convertView</code> parameter used for in <code>getView()</code> method of <code>Adapter</code> class.</p>

<p>Here is a sample code :</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><em>Sample is taken from <a href="http://www.softwarepassion.com/android-series-custom-listview-items-and-adapters/">here</a>.</em></p>

<p>What should we pass via <code>convertView</code> ? </p>

<p><strong>What've I found is :</strong></p>

<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>

<p>Source : <a href="http://developer.android.com/reference/android/widget/Adapter.html">http://developer.android.com/reference/android/widget/Adapter.html</a></p>
