ManuelPeinado / MultiChoiceAdapter

Android - A ListView adapter with support for multiple choice modal selection
Apache License 2.0
849 stars 260 forks source link

Use AlphabetIndexer with MultiChoiceBaseAdapter #9

Closed lakeba closed 11 years ago

lakeba commented 11 years ago

Any chance to use the AlphabetIndexer with MultiChoiceBaseAdapter ?

ManuelPeinado commented 11 years ago

As far as I know AlphabetIndex must be used with a cursor, so you'll have to use MultiChoiceSimpleCursorAdapter.

I've written a sample that demonstrates that this is in fact pretty easy:

https://github.com/ManuelPeinado/MultiChoiceAdapter/tree/master/sample/src/com/manuelpeinado/multichoiceadapter/demo/alphabetindexersample

lakeba commented 11 years ago

I have implemented it also for MultiChoiceBaseAdapter, do you want me to merge it?

From: ManuelPeinado [mailto:notifications@github.com] Sent: lunedì 3 giugno 2013 23:23 To: ManuelPeinado/MultiChoiceAdapter Cc: Giuseppe Subject: Re: [MultiChoiceAdapter] Use AlphabetIndexer with MultiChoiceBaseAdapter (#9)

As far as I know AlphabetIndex must be used with a cursor, so you'll have to use MultiChoiceSimpleCursorAdapter.

I've written a sample that demonstrates that this is in fact pretty easy:

https://github.com/ManuelPeinado/MultiChoiceAdapter/tree/master/sample/src/com/manuelpeinado/multichoiceadapter/demo/alphabetindexersample

— Reply to this email directly or view it on GitHub https://github.com/ManuelPeinado/MultiChoiceAdapter/issues/9#issuecomment-18872269 . https://github.com/notifications/beacon/mWSZf_BQ3zaOqVGxn5p45q9W-s6-mTfw4Xr5D7XeVUbtpLxXEAqLkrDfBHlHcurU.gif

ManuelPeinado commented 11 years ago

There's something I don't understand. If you don't have a cursor, what do you pass AlphabetIndexer#setCursor? And if you do have a cursor, why don't you use a MultiChoiceSimpleCursorAdapter?

lakeba commented 11 years ago

I have just implemented SectionIndexer

Attached my class

It work a charm.

From: ManuelPeinado [mailto:notifications@github.com] Sent: martedì 4 giugno 2013 08:52 To: ManuelPeinado/MultiChoiceAdapter Cc: Giuseppe Subject: Re: [MultiChoiceAdapter] Use AlphabetIndexer with MultiChoiceBaseAdapter (#9)

There's something I don't understand. If you don't have a cursor, what do you pass AlphabetIndexer#setCursor? And if you do have a cursor, why don't you use a MultiChoiceSimpleCursorAdapter?

— Reply to this email directly or view it on GitHub https://github.com/ManuelPeinado/MultiChoiceAdapter/issues/9#issuecomment-18892078 . https://github.com/notifications/beacon/mWSZf_BQ3zaOqVGxn5p45q9W-s6-mTfw4Xr5D7XeVUbtpLxXEAqLkrDfBHlHcurU.gif