From 820fa8883dc687894a34aadfff44ccaea21f0640 Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 2 Jul 2019 19:48:06 +0200 Subject: [PATCH] do not show locked folders thumbnails, just a placeholder --- app/build.gradle | 2 +- .../gallery/pro/adapters/DirectoryAdapter.kt | 27 ++++++++++++++++++- .../main/res/layout/directory_item_grid.xml | 14 ++++++++++ app/src/main/res/values-sw600dp/dimens.xml | 1 + app/src/main/res/values/dimens.xml | 1 + 5 files changed, 43 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 3df1aeded..22fa6f38b 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -61,7 +61,7 @@ android { } dependencies { - implementation 'com.simplemobiletools:commons:5.14.7' + implementation 'com.simplemobiletools:commons:5.14.8' implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0' implementation 'androidx.multidex:multidex:2.0.1' implementation 'it.sephiroth.android.exif:library:1.0.1' diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt index 96fcb8911..3e827d825 100644 --- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt +++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/DirectoryAdapter.kt @@ -30,7 +30,14 @@ import com.simplemobiletools.gallery.pro.helpers.* import com.simplemobiletools.gallery.pro.interfaces.DirectoryOperationsListener import com.simplemobiletools.gallery.pro.models.AlbumCover import com.simplemobiletools.gallery.pro.models.Directory +import kotlinx.android.synthetic.main.directory_item_grid.view.* import kotlinx.android.synthetic.main.directory_item_list.view.* +import kotlinx.android.synthetic.main.directory_item_list.view.dir_check +import kotlinx.android.synthetic.main.directory_item_list.view.dir_location +import kotlinx.android.synthetic.main.directory_item_list.view.dir_name +import kotlinx.android.synthetic.main.directory_item_list.view.dir_pin +import kotlinx.android.synthetic.main.directory_item_list.view.dir_thumbnail +import kotlinx.android.synthetic.main.directory_item_list.view.photo_cnt import java.io.File class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList, val listener: DirectoryOperationsListener?, recyclerView: MyRecyclerView, @@ -46,9 +53,11 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList() init { setupDragListener(true) + fillLockedFolders() } override fun getActionMenuId() = R.menu.cab_directories @@ -328,6 +337,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList) { val directories = newDirs.clone() as ArrayList if (directories.hashCode() != currentDirectoriesHash) { currentDirectoriesHash = directories.hashCode() dirs = directories + fillLockedFolders() notifyDataSetChanged() finishActMode() } @@ -582,7 +601,13 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList + + 38dp 70dp 100dp + 80dp diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 4fb4f60fd..db0229a17 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -22,4 +22,5 @@ 86dp 110dp 40dp + 40dp