Android : get data from SQLite in ascending order: android

on Thursday, March 19, 2015


I have below code to get data from SQLite database in android.



SystemCountryListDS system_country_list_ds;
system_country_list_ds.open();
List<SystemCountryList> system_country_list = system_country_list_ds.findAll();


I want to get this list in ascending order by country name. How can I do that?


I tried to do this on list:



Collections.sort(system_country_list);


It's giving me error:



inferred type is not within its bound; should implement java.lang.comparable



0 comments:

Post a Comment