WHEN WILL WE USE GETVIEW() for display

GetView () is used when
1:Each row has different layouts
2:We need to configure some widgets.
In these situations we use getview()and override the view....
eg:
public class Listexample extends ListActivity {
TextView show;
String[] items={"lorem", "ipsum", "dolor", "sit", "amet",
"consectetuer", "adipiscing", "elit", "morbi", "vel",
"ligula", "vitae", "arcu", "aliquet", "mollis",
"etiam", "vel", "erat", "placerat", "ante",
"porttitor", "sodales", "pellentesque", "augue",
"purus"};
@Override
public void onCreate(Bundle savedBundleInstance) {
super.onCreate(savedBundleInstance);
setContentView(R.layout.main);
setListAdapter(new dynamiclistview(this));
}
public void onListItemClick(ListView parent, View v,
int position, long id) {
selection.setText(items[position]);
}
class dynamiclistview extends ArrayAdapter {
Activity context;
 
//Constructor----------------
dynamiclistview(Activity context) {
super(context, R.layout.row, items);
this.context=context;
}
//-------------Overriding the view--
public View getView(int position, View convertView,
ViewGroup parent) {
View row=convertView;
if (row==null) {
ViewInflate inflater=context.getViewInflate();
row=inflater.inflate(R.layout.row, null, null);
}
TextView label=(TextView)row.findViewById(R.id.label);
label.setText(items[position]);
if (items[position].length()>4) {
ImageView icon=(ImageView)row.findViewById(R.id.icon);
icon.setImageResource(R.drawable.delete);
}
return(row);
}
}
}