2

I have a ListView with custom row layout. Basically right now they show two labels, but now I need to add a dynamically customView of ImageView + label in every single row. For example, I can have a row with 2 labels, a row with 2 labels + n*(ImageView + anotherLabel). How can I manage that?

Alex
  • 781
  • 10
  • 23
Alessio Crestani
  • 1,602
  • 4
  • 17
  • 38

1 Answers1

0

Extend BaseAdapter and implement getView which should return/reuse the correct View type. A really good tutorial to get started with BaseAdapter can be found at http://www.piwai.info/android-adapter-good-practices/

Nova Entropy
  • 5,727
  • 1
  • 19
  • 32
  • I'm already doing this, but I can have 0, 1, n ImageView + Label to add, so I can add them to the xml layout, i need to add them dynamically. – Alessio Crestani Sep 05 '14 at 08:45