[android-developers] Re: Getting getViewTypeCount() to fire?

2010-03-02 Thread Mark Wyszomierski
Right so let's say my adapter looks like this, and by default I always have 5 cows to render, and 0 horses to render. Cows and Horses each require a different view type: public class MyAdapter extends BaseAdapter { ArrayListHorse mHorses; ArrayListCow mCows; public MyAdapter() {

Re: [android-developers] Re: Getting getViewTypeCount() to fire?

2010-03-02 Thread Mark Murphy
Mark Wyszomierski wrote: @Override public int getViewTypeCount() { int count = 0; if (mHorses.size() 0 { count++; } if (mCows.size() 0) { count+; } return count; } Just return 2 from getViewTypeCount(). What do you think you're gaining from

[android-developers] Re: Getting getViewTypeCount() to fire?

2010-03-02 Thread Mark Wyszomierski
In that example, nothing, but if I have an adapter which can accept an unknown amount of types, I would need something like that, right? Thanks On Mar 2, 11:42 am, Mark Murphy mmur...@commonsware.com wrote: Mark Wyszomierski wrote:   @Override   public int getViewTypeCount() {     int

Re: [android-developers] Re: Getting getViewTypeCount() to fire?

2010-03-02 Thread Mark Murphy
Mark Wyszomierski wrote: In that example, nothing, but if I have an adapter which can accept an unknown amount of types, I would need something like that, right? You can't have an unknown amount of types. You can't even have a variable-at-runtime amount of types. -- Mark Murphy (a Commons