Collections.sort()
方法对数据源进行排序,然后调用notifyDataSetChanged()
方法刷新列表视图。,,``java,Collections.sort(dataList, new Comparator() {, @Override, public int compare(MyData o1, MyData o2) {, return o1.getField().compareTo(o2.getField());, },});,adapter.notifyDataSetChanged();,
``