[Android] Remove old action button for custom dir

Geoffrey Métais git at videolan.org
Tue May 12 14:40:52 CEST 2015


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue May 12 14:38:29 2015 +0200| [d53fe7da05bb576f44d246dbcd5f78b2c0845312] | committer: Geoffrey Métais

Remove old action button for custom dir

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

 vlc-android/res/drawable-hdpi/ic_add_white.png         |  Bin 180 -> 0 bytes
 vlc-android/res/drawable-mdpi/ic_add_white.png         |  Bin 135 -> 0 bytes
 vlc-android/res/drawable-xhdpi/ic_add_white.png        |  Bin 243 -> 0 bytes
 vlc-android/res/drawable-xxhdpi/ic_add_white.png       |  Bin 428 -> 0 bytes
 vlc-android/res/drawable-xxxhdpi/ic_add_white.png      |  Bin 609 -> 0 bytes
 vlc-android/res/menu/media_library.xml                 |    6 ------
 vlc-android/src/org/videolan/vlc/gui/MainActivity.java |   11 +----------
 7 files changed, 1 insertion(+), 16 deletions(-)

diff --git a/vlc-android/res/drawable-hdpi/ic_add_white.png b/vlc-android/res/drawable-hdpi/ic_add_white.png
deleted file mode 100644
index 3a15191..0000000
Binary files a/vlc-android/res/drawable-hdpi/ic_add_white.png and /dev/null differ
diff --git a/vlc-android/res/drawable-mdpi/ic_add_white.png b/vlc-android/res/drawable-mdpi/ic_add_white.png
deleted file mode 100644
index 6d8e55d..0000000
Binary files a/vlc-android/res/drawable-mdpi/ic_add_white.png and /dev/null differ
diff --git a/vlc-android/res/drawable-xhdpi/ic_add_white.png b/vlc-android/res/drawable-xhdpi/ic_add_white.png
deleted file mode 100644
index 078af52..0000000
Binary files a/vlc-android/res/drawable-xhdpi/ic_add_white.png and /dev/null differ
diff --git a/vlc-android/res/drawable-xxhdpi/ic_add_white.png b/vlc-android/res/drawable-xxhdpi/ic_add_white.png
deleted file mode 100644
index 944441d..0000000
Binary files a/vlc-android/res/drawable-xxhdpi/ic_add_white.png and /dev/null differ
diff --git a/vlc-android/res/drawable-xxxhdpi/ic_add_white.png b/vlc-android/res/drawable-xxxhdpi/ic_add_white.png
deleted file mode 100644
index 37544db..0000000
Binary files a/vlc-android/res/drawable-xxxhdpi/ic_add_white.png and /dev/null differ
diff --git a/vlc-android/res/menu/media_library.xml b/vlc-android/res/menu/media_library.xml
index 4dbb4ad..65a329f 100644
--- a/vlc-android/res/menu/media_library.xml
+++ b/vlc-android/res/menu/media_library.xml
@@ -10,12 +10,6 @@
         android:visible="false"
         vlc:showAsAction="ifRoom" />
     <item
-        android:id="@+id/ml_menu_add_dir"
-        android:icon="@drawable/ic_add_white"
-        android:title="@string/add_custom_path"
-        android:visible="false"
-        vlc:showAsAction="always" />
-    <item
         android:id="@+id/ml_menu_clean"
         android:icon="@drawable/ic_trash_normal_w"
         android:title="@string/clear_history"
diff --git a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
index d61d0af..47591c3 100644
--- a/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/MainActivity.java
@@ -319,7 +319,7 @@ public class MainActivity extends AudioPlayerContainerActivity implements OnItem
             if (mCurrentFragment.equals(SidebarEntry.ID_NETWORK) || mCurrentFragment.equals(SidebarEntry.ID_DIRECTORIES)){
                 BaseBrowserFragment browserFragment = (BaseBrowserFragment) getSupportFragmentManager()
                         .findFragmentById(R.id.fragment_placeholder);
-                if (browserFragment !=null && !browserFragment.isRootDirectory()) {
+                if (browserFragment != null) {
                     browserFragment.goBack();
                     return;
                 }
@@ -457,11 +457,6 @@ public class MainActivity extends AudioPlayerContainerActivity implements OnItem
             menu.findItem(R.id.ml_menu_clean).setVisible(!((MRLPanelFragment) current).isEmpty());
         boolean showLast = current instanceof AudioBrowserFragment || (current instanceof VideoGridFragment && mSettings.getString(PreferencesActivity.VIDEO_LAST, null) != null);
         menu.findItem(R.id.ml_menu_last_playlist).setVisible(showLast);
-
-        if (current instanceof StorageBrowserFragment && ((StorageBrowserFragment) current).isRootDirectory())
-            menu.findItem(R.id.ml_menu_add_dir).setVisible(true);
-        else
-            menu.findItem(R.id.ml_menu_add_dir).setVisible(false);
         return true;
     }
 
@@ -533,10 +528,6 @@ public class MainActivity extends AudioPlayerContainerActivity implements OnItem
                 ((NetworkBrowserFragment)current).toggleFavorite();
                 item.setIcon(R.drawable.ic_menu_bookmark_w);
                 break;
-            case R.id.ml_menu_add_dir:
-                if (current != null && current instanceof StorageBrowserFragment)
-                    ((StorageBrowserFragment) current).showAddDirectoryDialog();
-                break;
         }
         mDrawerLayout.closeDrawer(mListView);
         return super.onOptionsItemSelected(item);



More information about the Android mailing list