KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm trying update a ListView with an entirely new ArrayList. For API 11 it works great using the addAll(...) method, but this is not available for earlier APIs. I can't figure out how to go about updating an entire list like this for older versions. ArrayAdapter<String> textList = new ArrayAdapter<String>(listener, R.layout.list_item, stringList); listener.setListAdapter(textList); Then later... textList.clear(); textList.addAll(stringList); <--- works fine for Android 3.0 (API Level 11) and beyond, but not before. How did you go about doing this before addAll() was introduced in API 11? Thanks.
Tags (comma-separated)
Save Edits
Cancel