[Android] Hilight (in bold in menudrawer) current fragment

Geoffrey Métais git at videolan.org
Wed Dec 24 14:52:42 CET 2014


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Dec 24 14:51:43 2014 +0100| [9f2a8977317b6138a55173ffac1518e4fc277bde] | committer: Geoffrey Métais

Hilight (in bold in menudrawer) current fragment

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

 vlc-android/src/org/videolan/vlc/gui/MainActivity.java   |    1 +
 vlc-android/src/org/videolan/vlc/gui/SidebarAdapter.java |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index d020a25..cb58e41 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -273,6 +273,7 @@ public class MainActivity extends ActionBarActivity {
                     ft.commit();
                     supportInvalidateOptionsMenu();
                     mCurrentFragment = entry.id;
+                    mSidebarAdapter.setCurrentFragment(mCurrentFragment);
 
                 /*
                  * Set user visibility hints to work around weird Android
diff --git a/vlc-android/src/org/videolan/vlc/gui/SidebarAdapter.java b/vlc-android/src/org/videolan/vlc/gui/SidebarAdapter.java
index ab1fabf..fdaeaec 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SidebarAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/SidebarAdapter.java
@@ -168,7 +168,7 @@ public class SidebarAdapter extends BaseAdapter {
         return f;
     }
 
-    private void setCurrentFragment(String id) {
+    public void setCurrentFragment(String id) {
         mCurrentFragmentId = id;
         this.notifyDataSetChanged();
     }



More information about the Android mailing list