[Android] Set title for video groups

Sébastien Toque git at videolan.org
Sun Nov 23 09:34:13 CET 2014


vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Sun Nov 23 09:33:07 2014 +0100| [a4314918bd50b422d74655d97b2c782d94be2858] | committer: Sébastien Toque

Set title for video groups

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

 .../src/org/videolan/vlc/gui/video/VideoGridFragment.java       |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

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 1f022a0..03af287 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -57,6 +57,7 @@ import android.os.Handler;
 import android.os.Message;
 import android.preference.PreferenceManager;
 import android.support.v4.app.FragmentActivity;
+import android.support.v7.app.ActionBar;
 import android.support.v7.app.ActionBarActivity;
 import android.util.DisplayMetrics;
 import android.util.Log;
@@ -130,7 +131,11 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
     @Override
     public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)
     {
-        ((ActionBarActivity) getActivity()).getSupportActionBar().setTitle(R.string.video);
+        ActionBar actionBar = ((ActionBarActivity) getActivity()).getSupportActionBar();
+        if (mGroup == null)
+            actionBar.setTitle(R.string.video);
+        else
+            actionBar.setTitle(mGroup);
 
         View v = inflater.inflate(R.layout.video_grid, container, false);
 



More information about the Android mailing list