I have 5,000 names in the database. I want all of these names to be inflated in a ListView. Which has the following elements
- Image icon (which is stored locally in Drawables)
- Name
- The distance in km.
I am filtering this View list with search filtering, something like this:
adapter.getFilter().filter(someText);
I also sort listview, for example: sort listView names in alphabetical order (AZ and ZA). Sorting is performed in the listView adapter as follows:
adapter.sort(new Comparator<String>() { @Override public int compare(String lhs, String rhs) { return lhs.getPlaceName().compareTo(rhs.getPlaceName()); }; });
Now I'm pretty confused about whether to use Lazy loading names in a listview (because I have 5000+ names), given the performance of the adapter. Please suggest.
source share