Why dont you try creating a comparator class.
The Class implements Comparator and its method compare to do comparison ...
you can make a condition here that can do sorting based on your preference.
Then call Collection.sort(urList,new instanceOfComparator());
you can modify the constructor to pass your preference like
Just dont forget to use compareTO for comparison of String to have more accurate result.
Please correct me if i am wronng or have made a wrong interpretation of your question.
Hello i did what you said and it works perfectly. One more question, not opening new post because it is for the same list of objects, how can i filter this list of objects from text in a edittext?
Can this be done dynamically or is there another way?
thanks in advance.
Joined: Sep 05, 2011
i am sorry i dint not understand your question. properly i guess
you can use an AutoCompleteTextView instead of EditText this will work just like conact list from your cell phone fetching data dynamically from a predefined list as you type.