[Android] Remove deprecated call

Geoffrey Métais git at videolan.org
Mon Mar 9 15:58:15 CET 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Mon Mar  9 11:47:37 2015 +0100| [7cc9deb83e70f9c7b94f6d05912bac526f058648] | committer: Geoffrey Métais

Remove deprecated call

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=7cc9deb83e70f9c7b94f6d05912bac526f058648
---

 .../tv/src/org/videolan/vlc/gui/tv/SearchFragment.java      |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/vlc-android/tv/src/org/videolan/vlc/gui/tv/SearchFragment.java b/vlc-android/tv/src/org/videolan/vlc/gui/tv/SearchFragment.java
index 58cf8a1..1405c53 100644
--- a/vlc-android/tv/src/org/videolan/vlc/gui/tv/SearchFragment.java
+++ b/vlc-android/tv/src/org/videolan/vlc/gui/tv/SearchFragment.java
@@ -34,7 +34,10 @@ import android.support.v17.leanback.widget.ListRow;
 import android.support.v17.leanback.widget.ListRowPresenter;
 import android.support.v17.leanback.widget.ObjectAdapter;
 import android.support.v17.leanback.widget.OnItemClickedListener;
+import android.support.v17.leanback.widget.OnItemViewClickedListener;
+import android.support.v17.leanback.widget.Presenter;
 import android.support.v17.leanback.widget.Row;
+import android.support.v17.leanback.widget.RowPresenter;
 import android.text.TextUtils;
 
 public class SearchFragment extends android.support.v17.leanback.app.SearchFragment
@@ -53,7 +56,7 @@ public class SearchFragment extends android.support.v17.leanback.app.SearchFragm
 
         mRowsAdapter = new ArrayObjectAdapter(new ListRowPresenter());
         setSearchResultProvider(this);
-        setOnItemClickedListener(getDefaultItemClickedListener());
+        setOnItemViewClickedListener(getDefaultItemClickedListener());
         mDelayedLoad = new SearchRunnable();
         mActivity = getActivity();
     }
@@ -98,10 +101,10 @@ public class SearchFragment extends android.support.v17.leanback.app.SearchFragm
         });
     }
 
-    protected OnItemClickedListener getDefaultItemClickedListener() {
-        return new OnItemClickedListener() {
+    protected OnItemViewClickedListener getDefaultItemClickedListener() {
+        return new OnItemViewClickedListener() {
             @Override
-            public void onItemClicked(Object item, Row row) {
+            public void onItemClicked(Presenter.ViewHolder itemViewHolder, Object item, RowPresenter.ViewHolder rowViewHolder, Row row) {
                 if (item instanceof MediaWrapper) {
                     TvUtil.openMedia(mActivity, (MediaWrapper) item, row);
                 }



More information about the Android mailing list