-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Sorting #51
Comments
@rubengees I think this is out of scope. You can provide a new list to the Collections.sort() http://docs.oracle.com/javase/6/docs/api/java/util/Collections.html#sort(java.util.List) No need to add more methods here, as it would just call this single method. I prefer this library to stay really focused. |
Yeah sure I know that I can sort myself, but it would be really handy if I won't have to. When I read the description of FastAdapter I thought it was some kind of All-in-one adapter which does all the common things you do with lists without the need for you to write the boilerplate yourself. So I don't think this is out of scope. The lists of other languages like C# offer such functionality out of the box. |
@mikepenz In your way I have to get all items from adapter, sort them and then put them back in the adapter? Is this correct? |
@Rainer-Lang normally you know about your items. You have to add them at some point. So I assume that you still know about the items at the point of time when you want to sort them |
@mikepenz And for "only" re-sorting, which method would you suggest?
|
…s will automatically sort the list as soon as new items are added or set * FIX #51
@rubengees Please take a look at the newest version. |
Great! Thank you. |
@rubengees Would you like to provide this project with a little sample to this feature? |
Nice, thank you for adding me 👌 |
Thanks for contributing. |
So I just started to try this lib. One thing I am missing is sorting of items.
Sure we could sort our datasets ourself every time but it would be very handy to have something like
withComperator(Comparator comparator)
orwithEnableNaturalSorting(boolean enable)
.This could also allow to later just throw a new comparator in and have the data resorted.
I think this would be a very nice feature as most modern apps feature something like "Sort entries by label" and "Sort entries by modification time" like my App does.
The text was updated successfully, but these errors were encountered: