Question

Im at a bit of loss on this one on how to produce sections in a ListView when you use both Cursors and a Custom SimpleCursorAdapter.

Many of the docs out there reference using getView() etc, or creating several Adapters and adding section headers.

But these all appear to be based on BaseAdapters, ListAdapters, and ArrayAdapters etc.

Has anybody dealt with anything similar previously?

If not, any tips on how to make this work?

Thanks Simon

Was it helpful?

Solution

I followed this tutorial and it worked out pretty well. The code allows you to use any sort of Adapter, so it works great with ArrayAdapter or CursorAdapter.

OTHER TIPS

If you're using a CursorAdapter, you can use my SectionCursorAdapter.

Another great one which is in active development is SectionCursorAdapter and it supports gradle. The creator of the it has also promised that it will be updated to support RecyclerView when it is officially released. You can also check out the blog post about it at ToastDroid

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top