kingkung wrote: > Is there a simple way to do this through a listAdapter, like > ArrayAdapter, etc.? The way I see it, an ArrayAdapter is only able to > fill in ALL of the textview A's first, and then all of the textview > B's, and then all of the textview C's. But there are clearly some > entries which don't have all three text views, and hence the array > would leave an empty space for that entry.
Create your own subclass of ArrayAdapter and override getView(). It will be called for each one of your visible entries (#1, #2, #3, etc.). There, you can construct your own View that includes whichever of A, B, or C you need and return it. Those Views will then go into your overall ListView. To create your own per-item Views, you can either build and connect them in Java, or create a separate layout XML file for the items and use the ViewInflate class to give you Views based on that layout, which you can then fill in and customize (e.g., make unused ones invisible). -- Mark Murphy http://commonsware.com The Busy Coder's Guide to Android Development -- coming in June 2008! --~--~---------~--~----~------------~-------~--~----~ 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] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---

