private List<Map<String, Object>> getData() {
List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
//add Data ...
//对list进行排序
if (!list.isEmpty()) {
Collections.sort(list, new Comparator<Map<String, Object>>() {
@Override
public int compare(Map<String, Object> object1,
Map<String, Object> object2) {
//根据文本排序
return ((String) object1.get("text_content")).compareTo((String) object2.get("text_content"));
}
});
}
return list;
}