diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt
index 37fd0df9a..1fb33ce88 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MainActivity.kt
@@ -78,6 +78,10 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
mStoredScrollHorizontally = config.scrollHorizontally
storeStoragePaths()
checkWhatsNewDialog()
+
+ directories_empty_text.setOnClickListener {
+ showFilterMediaDialog()
+ }
}
override fun onCreateOptionsMenu(menu: Menu): Boolean {
@@ -130,6 +134,8 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
tryloadGallery()
invalidateOptionsMenu()
+ directories_empty_text_label.setTextColor(config.textColor)
+ directories_empty_text.setTextColor(config.primaryColor)
}
override fun onPause() {
@@ -395,6 +401,9 @@ class MainActivity : SimpleActivity(), DirectoryAdapter.DirOperationsListener {
directories_refresh_layout.isRefreshing = false
mIsGettingDirs = false
+ directories_empty_text_label.beVisibleIf(dirs.isEmpty() && !isFromCache)
+ directories_empty_text.beVisibleIf(dirs.isEmpty() && !isFromCache)
+
checkLastMediaChanged()
if (dirs.hashCode() == mDirs.hashCode())
return
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt
index 0d4ca59fd..e78513982 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/activities/MediaActivity.kt
@@ -75,6 +75,10 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
mShowAll = config.showAll
if (mShowAll)
supportActionBar?.setDisplayHomeAsUpEnabled(false)
+
+ media_empty_text.setOnClickListener {
+ showFilterMediaDialog()
+ }
}
override fun onResume() {
@@ -97,6 +101,8 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
tryloadGallery()
invalidateOptionsMenu()
+ media_empty_text_label.setTextColor(config.textColor)
+ media_empty_text.setTextColor(config.primaryColor)
}
override fun onPause() {
@@ -317,7 +323,7 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
}
private fun isDirEmpty(): Boolean {
- return if (mMedia.size <= 0) {
+ return if (mMedia.size <= 0 && config.filterMedia > 0) {
deleteDirectoryIfEmpty()
finish()
true
@@ -459,6 +465,9 @@ class MediaActivity : SimpleActivity(), MediaAdapter.MediaOperationsListener {
mIsGettingMedia = false
media_refresh_layout.isRefreshing = false
+ media_empty_text_label.beVisibleIf(media.isEmpty() && !isFromCache)
+ media_empty_text.beVisibleIf(media.isEmpty() && !isFromCache)
+
checkLastMediaChanged()
if (mLastDrawnHashCode == 0)
mLastDrawnHashCode = media.hashCode()
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 19fd7e7bd..9432206a7 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -11,6 +11,28 @@
android:layout_width="match_parent"
android:layout_height="wrap_content">
+
+
+
+
+
+
+
+
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
This function hides the folder by adding a \'.nomedia\' file into it, it will hide all subfolders too. You can see them by toggling the \'Show hidden folders\' option in Settings. Continue?
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index 0d5b5652c..59096e4dd 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Tato funkce skryje složku, včetně podsložek, přidáním souboru \'.nomedia\'. Zobrazíte je zvolením možnosti \'Zobrazit skryté složky\' v nastavení. Pokračovat?
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 205a86c71..b2283cc77 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Diese Funktion versteckt ausgewählte Ordner (auch für andere Apps), indem dort im Dateisystem eine \'.nomedia\'-Datei abgelegt wird. Dadurch werden auch deren Unterordner versteckt. Solche Ordner werden nur gezeigt, wenn die Einstellung \'Versteckte Ordner zeigen\' aktiv ist (auch andere Apps bieten üblicherweise eine solche Option). Fortfahren?
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index a56b9ba8c..ff7f16ab3 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Esta función oculta la carpeta agregando un archivo \'.nomedia\' en ella, y ocultará también las subcarpetas. Puede mostrarlas cambiando la opción \'Mostrar carpetas ocultas\' en los Ajustes. ¿Continuar?
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index 556037f3f..e6a9920c5 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Cette option masque le dossier en ajoutant un fichier \'.nomedia\' à l\'intérieur, cela masquera aussi tous les sous-dossiers. Vous pouvez les voir en modifiant l\'option \'Afficher les dossiers cachés\' dans les Paramètres. Continuer ?
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 1c4b04c34..675222f5b 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
This function hides the folder by adding a \'.nomedia\' file into it, it will hide all subfolders too. You can see them by toggling the \'Show hidden folders\' option in Settings. Continue?
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index a1b48cf8c..dca88c2e0 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Questa funzione nasconde la cartella aggiungendo un file \'.nomedia\' all\'interno, nasconderà anche tutte le sottocartelle. Puoi vederle attivando l\'opzione \'Mostra cartelle nascoste\' nelle impostazioni. Continuare?
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index 0a56bc8bd..673e9ac42 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
This function hides the folder by adding a \'.nomedia\' file into it, it will hide all subfolders too. You can see them by toggling the \'Show hidden folders\' option in Settings. Continue?
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 722416c06..61bf33160 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Ta funkcja ukrywa foldery dodając do nich pusty plik .nomedia. Aby móc je zobaczyć, należy włączyć opcję \'Pokazuj ukryte foldery\' w ustawieniach. Kontyntynuować?
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 24b7e10d4..11a1c03d6 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Esta opção oculta uma pasta com a adição de um arquivo \'.nomedia\' dentro dela, e irá ocultar todas as subpastas que estejam dentro da mesma. Você poderá rever essas pastas com a opção \'Mostrar pastas ocultas\'. Continuar?
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index d70a29e5b..2acddd5b7 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Esta opção oculta uma pasta com a adição de um ficheiro \'.nomedia\' na pasta, e irá ocultar todas as subpastas existentes. Pode ver as pastas com a opção \'Mostrar pastas ocultas\'. Continuar?
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index 1071d67d1..34aef359a 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Эта опция скрывает папку, добавляя в неё файл \'.nomedia\'; будут скрыты все подпапки. Можно показывать их, переключая \'Показать скрытые папки\' в настройках. Продолжить?
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 9b6c25cd4..deb90488c 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -31,6 +31,8 @@
Obrázky
Videá
GIFká
+ So zvolenými filtrami sa nenašli žiadne média súbory.
+ Zmeniť filtre
Táto funkcia skryje priečinok pridaním súboru \'.nomedia\', skryté budú aj podpriečinky. Môžete ich vidieť zvolením možnosti \'Zobraziť skryté priečinky\' v nastaveniach. Pokračovať?
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index d709b0a1c..c99a203bd 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Denna funktion döljer mappen och alla dess undermappar genom att lägga till en \'.nomedia\'-fil i den. Du kan se dem genom att växla \'Visa dolda mappar\'-alternativet i Inställningar. Vill du fortsätta?
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index f8d3f75d8..7403747d2 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
Bu işlev, klasöre\'.medya yok\'dosyası ekleyerek gizler; tüm alt klasörleri de gizler. Bunları Ayarlar\'da\'Gizli klasörleri göster\'seçeneğine basarak görebilirsiniz. Devam et?
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 52ad95db9..78fed273a 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
通过添加文件 \'.nomedia\' 到目录,可以防止目录及其子目录下的所有媒体被扫描。您可以通过设置中的 \'显示隐藏目录\' 选项改变设置,是否继续?
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index e21f9c4ec..ca9c2b7ee 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
這功能藉由添加一個\'.nomedia\'檔案,來隱藏資料夾和所有子資料夾。您可以透過設定中的「顯示隱藏的資料夾」選項來查看。\n是否繼續?
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index a1f884953..731313068 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -31,6 +31,8 @@
Images
Videos
GIFs
+ No media files have been found with the selected filters.
+ Change filters
This function hides the folder by adding a \'.nomedia\' file into it, it will hide all subfolders too. You can see them by toggling the \'Show hidden folders\' option in Settings. Continue?