[Android] do not use ArrayAdapter.addAll (added in API11) to keep compatibility

Sébastien Toque git at videolan.org
Sun May 6 13:12:09 CEST 2012


android | branch: master | Sébastien Toque <xilasz at gmail.com> | Sun May  6 13:02:11 2012 +0200| [2f9b31c19236825401c3354a8e8f1e26d3615e53] | committer: Sébastien Toque

do not use ArrayAdapter.addAll (added in API11) to keep compatibility

> http://git.videolan.org/gitweb.cgi/android.git/?a=commit;h=2f9b31c19236825401c3354a8e8f1e26d3615e53
---

 .../src/org/videolan/vlc/gui/SearchActivity.java   |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java b/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java
index 7bd3497..83f5b58 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/SearchActivity.java
@@ -164,7 +164,9 @@ public class SearchActivity extends ListActivity {
 
         DatabaseManager db = DatabaseManager.getInstance(this);
         mHistoryAdapter.clear();
-        mHistoryAdapter.addAll(db.getSearchhistory(20));
+        ArrayList<String> history = db.getSearchhistory(20);
+        for (String s : history)
+            mHistoryAdapter.add(s);
         mHistoryAdapter.notifyDataSetChanged();
         setListAdapter(mHistoryAdapter);
     }



More information about the Android mailing list