I have a tabbed layout with 3 tabs. All tabs are loaded with List Fragments. I need to sort the List Fragment in both ascending and descending order. Display both within the same tab. When we click the tab, it should sort in ascending order. If the same tab is re-selected, it to sort in descending order and display the result.
Is it possible to nest List-Fragment within a tab ?
Yes, we can achieve this by using Collections.reverse(list)
// Here we are using reverse() method
// to reverse the element order of mylist
Collections.reverse(mylist);