Thanks Mark. I don't really understand what it means. I have a list view, and I attach the adapter through the setAdapter method of the ListView. Should I be doing something else?
Kumar Bibek http://techdroid.kbeanie.com http://www.kbeanie.com On Wed, Apr 27, 2011 at 11:53 PM, Mark Murphy <[email protected]>wrote: > On Wed, Apr 27, 2011 at 2:17 PM, Kumar Bibek <[email protected]> wrote: > > getItemViewType(int position) - Overridden > > getViewTypeCount() - Overridden (Always returns 3) > > > > I was going through the docs, and I found this. > > > > public int getViewTypeCount () > > > > Returns the number of types of Views that will be created by > > getView(int, View, ViewGroup). Each type represents a set of views > > that can be converted in getView(int, View, ViewGroup). If the adapter > > always returns the same type of View for all items, this method should > > return 1. > > > > This method will only be called when when the adapter is set on the > > the AdapterView. > > > > Returns > > > > The number of types of Views that will be created by this adapter > > > > What exactly does this "This method will only be called when when the > > adapter is set on the the AdapterView." mean? > > It means this method will only be called when setAdapter() is called > on the AdapterView. > > -- > Mark Murphy (a Commons Guy) > http://commonsware.com | http://github.com/commonsguy > http://commonsware.com/blog | http://twitter.com/commonsguy > > _Android Programming Tutorials_ Version 3.3 Available! > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

