[Android] [PATCH 4/5] Remote playback: access to the RemotePlaybackActivity through a long lick on a media in the video grid

Adrien Maglo magsoft at gmail.com
Tue Jul 8 16:33:48 CEST 2014


---
 vlc-android/res/menu/video_list.xml                               | 3 +++
 vlc-android/res/values/strings.xml                                | 1 +
 vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java | 5 +++++
 3 files changed, 9 insertions(+)

diff --git a/vlc-android/res/menu/video_list.xml b/vlc-android/res/menu/video_list.xml
index ffd4d5c..be0ac79 100644
--- a/vlc-android/res/menu/video_list.xml
+++ b/vlc-android/res/menu/video_list.xml
@@ -13,4 +13,7 @@
     <item
         android:id="@+id/video_list_delete"
         android:title="@string/delete" />
+    <item
+        android:id="@+id/video_list_remote_playback"
+        android:title="@string/remote_playback" />
 </menu>
\ No newline at end of file
diff --git a/vlc-android/res/values/strings.xml b/vlc-android/res/values/strings.xml
index a31ca4b..132ad33 100644
--- a/vlc-android/res/values/strings.xml
+++ b/vlc-android/res/values/strings.xml
@@ -30,6 +30,7 @@
     <string name="remove">Remove</string>
     <string name="set_song">Set as ringtone</string>
     <string name="info">Information</string>
+    <string name="remote_playback">Remote playback (Chromecast)</string>
     <string name="confirm_delete">Delete the file \'%1$s\'?</string>
     <string name="ringtone_set">The file \'%1$s\' was set as the ringtone.</string>
     <string name="ringtone_error">An error occurred while setting the ringtone.</string>
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index ddce5e4..22a8b2e 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -319,6 +319,11 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
                     });
             alertDialog.show();
             return true;
+        case R.id.video_list_remote_playback:
+            Intent i = new Intent(getActivity(), RemotePlaybackActivity.class);
+            i.putExtra("itemLocation", media.getLocation());
+            startActivity(i);
+            return true;
         }
         return false;
     }
-- 
1.9.1



More information about the Android mailing list