ayanir wrote: > Hello for all the Android's out there, > > I'm trying to make a ListView when every item in that list can be a > different type of View. > for example the list could be: > 1. TextView > 2. ImageView > 3. MyCustomView > > I understands that in order to make a list I need to use an Adapter. > the problem is that the Adapter uses a single layout for all of the > list items, which will not support the different views.
That is not necessarily the case. Override the view-building methods yourself, and you can do whatever you like. You will also need to override getItemViewType() and getViewTypeCount() appropriately. For some instruction on how to override getView() in ArrayAdapter, visit: http://wiki.andmob.org/samplecode and look for the links to the Fancy ListViews blog post series. -- Mark Murphy (a Commons Guy) http://commonsware.com | http://twitter.com/commonsguy Android Development Wiki: http://wiki.andmob.org --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---