user3166600
user3166600

Reputation:

Sorting lists in android?

(Note :i am not asking for code,if you have experience related to his topic,only then comment)

I am populating a very big list using Mediastore(a database) and sorting it by name initially,(using the sort order parameter in the cursor) that is working fine.Now I want to re sort that list depending on what user chooses.

So I am confused what should i use to sort?Should i use comparator ?Or should I use the cursor again ??I want the sorting to be very fast.

Is sorting using cursor faster than Comparator ?

Is Comparator good for very large lists ??

Is sorting using a database faster than any other thing ??

Please tell me what to go for ?

Upvotes: 1

Views: 64

Answers (1)

Malcolm
Malcolm

Reputation: 41498

If you can use a database to do something, then it is best to use the database. This way you will also leverage native code facilities, which will make it all faster. Make another query with different parameters if you can.

Upvotes: 2

Related Questions