[Android] Fix arrow behavior in Secondary Activity

Geoffrey Métais git at videolan.org
Wed May 13 12:16:12 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed May 13 11:46:12 2015 +0200| [1041844b13f5e5252ced37547c59244f351807d6] | committer: Geoffrey Métais

Fix arrow behavior in Secondary Activity

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

 .../src/org/videolan/vlc/gui/SecondaryActivity.java      |   14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java
index 975f2b9..6a25ebc 100644
--- a/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/SecondaryActivity.java
@@ -63,14 +63,6 @@ public class SecondaryActivity extends AudioPlayerContainerActivity {
 
         initAudioPlayerContainerActivity();
         mActionBar.setDisplayHomeAsUpEnabled(true);
-        mToolbar.setNavigationOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Fragment current = getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder);
-                if (current instanceof StorageBrowserFragment)
-                    ((StorageBrowserFragment) current).goBack();
-            }
-        });
 
         if (getSupportFragmentManager().getFragments() == null) {
             String fragmentId = getIntent().getStringExtra("fragment");
@@ -111,7 +103,11 @@ public class SecondaryActivity extends AudioPlayerContainerActivity {
         // Handle item selection
         switch (item.getItemId()) {
             case android.R.id.home:
-                finish();
+                Fragment current = getSupportFragmentManager().findFragmentById(R.id.fragment_placeholder);
+                if (current instanceof StorageBrowserFragment)
+                    ((StorageBrowserFragment) current).goBack();
+                else
+                    finish();
                 return true;
             case R.id.ml_menu_sortby_name:
             case R.id.ml_menu_sortby_length:



More information about the Android mailing list