0

I need a simple way without any Custom listAdapters to create a ListView with sections, or Categories.

Its important the the Categorie separator doesn't count as a listItem, because i am using the my list items position in the onClick() so every item counts.

Is there an easy way to do this?

Thanks :)

rel-s
  • 6,108
  • 11
  • 38
  • 50

1 Answers1

1

If you want section headers in a standard ListView, you're going to have to make your own adapter.

You could use an ExpandableListView, it sounds like exactly what you need.

EDIT

Ok, then you want to use MergeAdapter by CommonsWare. I just posted about it for someone else, it'll work for you too. I even included instructions. :)

MergeAdapter Answer

Hope this helps!

Community
  • 1
  • 1
Barak
  • 16,318
  • 9
  • 52
  • 84
  • I dont need an expandable. here is my situation: I am using a simpleAdapter for my listView, and using my own list row design from an XML file. I am afraid that since i dont know to use adapters ill mess it up, because i need everything the way it is right now. the onclick function has to be the same, and everything else. i have 2 lines of text and no idea how to do that or change them dynamically from a ListAdapter. So i must find a way to do it without, and i can't use an Expandable ListView. – rel-s May 10 '12 at 15:28
  • @arielschon12, I've got just the thing for you then. I've updated my answer, check it out. – Barak May 10 '12 at 15:34