title: Android Custom Listview
body: <p>I went through tutorials and searched, but still I can't understand how the,</p>
  
  <pre><code>getView(int position, View convertView, ViewGroup arg2)
  </code></pre>
  
  <p>method works when extends <code>BaseAdapter</code> to create a custom listView in my android application. Therefore I cant Edit the Custom list view exactly I want.</p>
  
  <p>I need to know when this method invokes and the meanings of the parameters.</p>
  
  <p>If someone can explain the following method its great. Thanks</p>
  
  <pre><code>@Override
  public View getView(int position, View convertView, ViewGroup arg2)
  {
  
      ViewHolder holder;
      LayoutInflater inflater =  context.getLayoutInflater();
  
      if (convertView == null)
      {
          convertView = inflater.inflate(R.layout.listitem_row, null);                     
          holder = new ViewHolder();
          holder.txtViewTitle = (TextView) convertView.findViewById(R.id.textView1);
          holder.txtViewDescription = (TextView) convertView.findViewById(R.id.textView2);
  
          convertView.setTag(holder);
      }
      else
      {
          holder = (ViewHolder) convertView.getTag();                                        
      }
  
      holder.txtViewTitle.setText(title[position]);
      holder.txtViewDescription.setText(description[position]);
  
  
  
    return convertView;
  }
  </code></pre>