Can somebody in plain words explain me the usage of getViewTypeCount()
and getItemViewType()
methods of ArrayAdapter
?
If we need to show different type of view in list-view then its good to use getViewTypeCount()
and getItemViewType()
in adapter instead of toggling a view View.GONE
and View.VISIBLE
can be very expensive task inside getView()
which will affect the list scroll.
Please check this one for use of getViewTypeCount()
and getItemViewType()
in Adapter.
Link : the-use-of-getviewtypecount