I've a custom ListView with 5 ArrayLists in the adaptor.
private ArrayList<String> name = new ArrayList<>();
private ArrayList<String> message = new ArrayList<>();
private ArrayList<Long> time = new ArrayList<>();
private ArrayList<String> imageId = new ArrayList<>();
private ArrayList<String> extras = new ArrayList<>();
ArrayList time contains remaining time in milliseconds. I want to display the list from lower to higher time left. If i just perform Collection.sort on a single ArrayList, others will remain unchanged. How can i sort all the ArrayLists accordingly with time.
I am passing all the ArrayLists to my custom adaptor at once.
Any suggestions?