Understanding getView
<p>I just started android course and I am like native to it. I want to understand the below lines of code used in custom Array adapters.</p>

<pre><code>public View getView(int position, View convertView, ViewGroup parent) {
// Check if the existing view is being reused, otherwise inflate the view
View listItemView = convertView;
if (listItemView == null) {
listItemView = LayoutInflater.from(getContext()).inflate(
R.layout.list_item, parent, false);
}
</code></pre>

<p>Can you please explain the below details.</p>

<ol>
<li><p>What is the parameter definitions of View convertView, ViewGroup parent and can you please explain each parameter for better understanding.</p></li>
<li><p>I understood what is LayoutInflater: it is used to inflate the layout for the view in the given context. But I didn't understand the Inflate method and it parameters. Can you please explain inflate(R.layout.list_item, parent, false) method and each of it parameters.</p></li>
<li><p>I understood Position parameter in the getview declaration as below. Please correct me if I am wrong</p></li>
</ol>

<p>Position is used to get the data from the arrayadapter for a particular position of the listview in the device. More over the data that will be populated is the data at the current index of the arrayadapter.</p>

<p>Please Note: I had searched android developers website, and blogs to understand the getview method. But no luck. Please assist.</p>

<p>Regards,
Nithin.</p>