I am sorting JSONArray and show them in a custom list view, but after sorting the data does not changed in custom list view.
Here is my code for fab button to select
Before set the data to Listview, you should sort the data using comparator class in java.
you create one Model class with all variable what you want (name,booth_id etc)and store the each object into the ArrayList.
Collections.sort(ArrayListObject,new NameComparator());
example
class NameComparator implements Comparator{
public int compare(Object o1,Object o2){
YourClassName s1=(YourClassName )o1;
YourClassName s2=(YourClassName )o2;
return s1.name.compareTo(s2.name);
}
}