I have like 5000 names in the database. I want all these names to be inflated onto a ListView. Which has the following elements
- Icon Image (which is stored locally in Drawables)
- Name
- Distance in kms
I am filtering this listView using Search Filtering, something like this:
adapter.getFilter().filter(someText);
I am also sorting the listview, for example: sort listView names alphabetically(A-Z and Z-A). Sorting is done on the listView adapter like this:
adapter.sort(new Comparator<String>() {
@Override
public int compare(String lhs, String rhs) {
return lhs.getPlaceName().compareTo(rhs.getPlaceName());
};
});
Now i am pretty confused whether to use Lazy loading of names onto the listview(because I have 5000+ names) considering the performance of the adapter. Please suggest.