I don't know if you can read French but there is a very good post on this French blog: http://android.cyrilmottier.com/?p=232 It explain how to build a custom adapter (BaseAdapter in fact) to manage 2 different types of cells on a list view. I hope the source source code will be enough for you.
The ArrayAdapter you are using is just a very simple way to display text cells on a listview. To display your 4 different types of items, you will need to create 4 layout (1 for each cell type) and then inflate them in the base adapter (as explained in the blog). On Sep 29, 4:43 pm, TreKing <treking...@gmail.com> wrote: > On Tue, Sep 28, 2010 at 8:40 PM, Varun Khanduja > <varunkhand...@gmail.com>wrote: > > > If anyone has time please try to help me out. Thanks, I looked into some > > examples but really found it hard to see how I can have the custom adapter > > runnning. > > The "custom" part of an adapter is basically returning the View you want to > show in your list for a given item. > > Currently you have the default ArrayAdapter that works on Strings. Since you > want something more complicated, all you have to do is create a class that > extends ArrayAdapter and override the getView() method to return the layouts > you want (as you described) based on the state of your list. > > So the first thing to do is create your custom ArrayAdapter, override > getView, then set it as the adapter to your list and verify your views show > up as expected. > > ------------------------------------------------------------------------------------------------- > TreKing <http://sites.google.com/site/rezmobileapps/treking> - Chicago > transit tracking app for Android-powered devices -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en