[Android] Set folders checked when parent is in MediaLibrary

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


vlc-ports/android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed May 13 12:03:34 2015 +0200| [9e2bd63d290a11410bcd587c2136fbfda7de122a] | committer: Geoffrey Métais

Set folders checked when parent is in MediaLibrary

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

 .../src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.java     |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.java b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.java
index 9ef5fda..78afabf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/browser/StorageBrowserAdapter.java
@@ -72,7 +72,8 @@ public class StorageBrowserAdapter extends BaseBrowserAdapter {
                 ((StorageBrowserFragment) fragment).browse(mw, holder.getAdapterPosition(), vh.checkBox.isChecked());
             }
         });
-        vh.checkBox.setChecked((isRoot && (mMediaDirsLocation == null || mMediaDirsLocation.isEmpty())) ||
+        vh.checkBox.setChecked(((StorageBrowserFragment) fragment).mScannedDirectory ||
+                (isRoot && (mMediaDirsLocation == null || mMediaDirsLocation.isEmpty())) ||
                 mMediaDirsLocation.contains(storage.getPath()));
         vh.checkBox.setEnabled(!((StorageBrowserFragment) fragment).mScannedDirectory);
         vh.checkBox.setOnClickListener(new View.OnClickListener() {



More information about the Android mailing list