Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SimpleCursorAdapter with Sections in Android

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

like image 956
Simon Avatar asked Jan 09 '11 17:01

Simon


2 Answers

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

like image 58
monxalo Avatar answered Oct 16 '22 12:10

monxalo


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

like image 25
MinceMan Avatar answered Oct 16 '22 12:10

MinceMan