ListViews - how to use ArrayAdapter.addAll() function before API 11?
问题 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