ArrayAdapter's GetView() Method Getting Called Automatically On Load And While Scrolling Listview
I am creating the custom list activity. There are two classes one is having extended ListActivity and other is having ArrayAdapter for that list activity. This listview contains a
Solution 1:
It seems you have not overridden getCount method. This method should return the number of row.
public int getCount () {
return n; /* where n is the number of row you want */
}
Besides how do you know the number of rows to be created? Do you need to create it just once for header? In that case you need to inflate that in headerView of List.
getView getting called is right behavior as the adapter is trying to inflate views at runtime to show in the list.
Post a Comment for "ArrayAdapter's GetView() Method Getting Called Automatically On Load And While Scrolling Listview"