From ed9250df7a8089061e22c23fb2ee7796fc2122ce Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Solatec=20Inform=C3=A0tica?=
<35220662+Solatec@users.noreply.github.com>
Date: Wed, 5 Dec 2018 11:10:48 +0100
Subject: [PATCH 01/99] Update strings.xml
---
app/src/main/res/values-ca/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml
index 25833a288..c639078f1 100644
--- a/app/src/main/res/values-ca/strings.xml
+++ b/app/src/main/res/values-ca/strings.xml
@@ -89,7 +89,7 @@
Verticalment
Editar amb
Lliure
- Other
+ Altres
Fons de pantalla de Simple Gallery
@@ -140,7 +140,7 @@
Animar les miniatures dels GIFs
Brillantor màxima quan es mostra multimèdia
Retallar miniatures en quadrats
- Show video durations
+ Mostra les durades del vídeo
Gira els mitjans a pantalla completa segons
Configuració del sistema
Rotació del dispositiu
From 6f3a0a555fdc503aabdcb7aa6a59002e234982f5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Solatec=20Inform=C3=A0tica?=
<35220662+Solatec@users.noreply.github.com>
Date: Wed, 5 Dec 2018 11:12:05 +0100
Subject: [PATCH 02/99] Update strings.xml
---
app/src/main/res/values-es/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 80c2796c0..7d65f1ac2 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -89,7 +89,7 @@
Verticalmente
Editar con
Libre
- Other
+ Otros
Fondos de pantalla Simple Gallery
@@ -140,7 +140,7 @@
Animar las miniaturas de GIFs
Brillo máximo cuando se muestra multimedia
Recortar miniaturas en cuadrados
- Show video durations
+ Mostrar duración del video
Rotar multimedia en pantalla completa según
Configuración del sistema
Rotación del dispositivo
From f798811163a952fa1a423baa740824479dfca7dc Mon Sep 17 00:00:00 2001
From: sawka6630
Date: Wed, 5 Dec 2018 23:09:22 +0200
Subject: [PATCH 03/99] Update strings.xml
---
app/src/main/res/values-uk/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index 273982f7d..a593e2671 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -89,7 +89,7 @@
Віддзеркалити вертикально
Редагувати за допомогою
Вільне
- Other
+ Інше
Simple Wallpaper
@@ -140,7 +140,7 @@
Анімувати ескізи GIF-файлів
Максимальна яскравість екрану при повноекранному перегляді медіафайлу
Обрізати ескізи у квадрат
- Show video durations
+ Показувати тривалість відео
При повноекранному перегляді обертати за…
системними налаштуваннями
поворотом пристрою
From 904e43e8f059987ad55e0cafaa0a15fd30730226 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Thu, 6 Dec 2018 15:23:52 +0100
Subject: [PATCH 04/99] check connected OTG devices only after receiving the
write_storage permission
---
.../gallery/pro/activities/MainActivity.kt | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 9fd6eb352..2ac01140e 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -126,10 +126,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
NewAppDialog(this, NEW_APP_PACKAGE, "Simple Clock")
}*/
- if (!config.wasOTGHandled && hasPermission(PERMISSION_WRITE_STORAGE)) {
- checkOTGInclusion()
- }
-
if (!config.wereFavoritesPinned) {
config.addPinnedFolders(hashSetOf(FAVORITES))
config.wereFavoritesPinned = true
@@ -385,6 +381,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
private fun tryLoadGallery() {
handlePermission(PERMISSION_WRITE_STORAGE) {
if (it) {
+ if (!config.wasOTGHandled && hasPermission(PERMISSION_WRITE_STORAGE)) {
+ checkOTGInclusion()
+ }
+
if (config.showAll) {
showAllMedia()
} else {
From 1df2a047e1d0a8a22e4a4c45fb4679473ca489c4 Mon Sep 17 00:00:00 2001
From: fricyo <30796677+fricyo@users.noreply.github.com>
Date: Fri, 7 Dec 2018 11:22:36 +0800
Subject: [PATCH 05/99] Update Translation
---
app/src/main/res/values-zh-rTW/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index 423570191..f8e08f4f7 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -89,7 +89,7 @@
垂直翻轉
用其他程式編輯
自由
- Other
+ 其它
簡易桌布
From 0dc1f2d90a56b9b6df3d74eaaa93254f12757a52 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9rgio=20Marques?=
Date: Fri, 7 Dec 2018 13:33:00 +0000
Subject: [PATCH 06/99] Update strings.xml
---
app/src/main/res/values-pt/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 681704fec..96c217a29 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -89,7 +89,7 @@
Verticalmente
Editar com
Livre
- Other
+ Outro
Simple Wallpaper
From 490ddd82568aea5951c8fbfc29ac304c6e202eb4 Mon Sep 17 00:00:00 2001
From: siswonugroho <33504481+siswonugroho@users.noreply.github.com>
Date: Mon, 10 Dec 2018 10:53:34 +0700
Subject: [PATCH 07/99] added Indonesian translation
---
app/src/main/res/values-id/strings.xml | 248 +++++++++++++++++++++++++
1 file changed, 248 insertions(+)
create mode 100644 app/src/main/res/values-id/strings.xml
diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml
new file mode 100644
index 000000000..6bc47a212
--- /dev/null
+++ b/app/src/main/res/values-id/strings.xml
@@ -0,0 +1,248 @@
+
+
+ Simple Gallery
+ Galeri
+ Edit
+ Buka kamera
+ (tersembunyi)
+ (dikecualikan)
+ Pin folder
+ Lepas pin folder
+ Pin ke atas
+ Tampilkan semua isi folder
+ Semua folder
+ Beralih ke tampilan folder
+ Folder lain
+ Tampilkan di peta
+ Lokasi tidak diketahui
+ Tambah jumlah kolom
+ Kurangi jumlah kolom
+ Ubah sampul
+ Pilih foto
+ Gunakan default
+ Volume
+ Kecerahan
+ Kunci rotasi
+ Aktifkan rotasi
+ Ubah orientasi
+ Paksa potret
+ Paksa landscape
+ Gunakan orientasi default
+ Perbaiki Tanggal Diambil
+ Memperbaiki…
+ Tanggal berhasil diperbaiki
+
+
+ Filter media
+ Gambar
+ Video
+ GIF
+ Gambar RAW
+ SVG
+ Tidak ada file media ditemukan dari filter ini.
+ Ubah filter
+
+
+ Fungsi ini menyembunyikan folder dengan menambahkan file \'.nomedia\' ke dalamnya, juga akan menyembunyikan semua subfolder. Anda bisa melihatnya dari opsi \'Tampilkan file tersembunyi\' di Setelan. Lanjutkan?
+ Kecualikan
+ Folder yang dikecualikan
+ Atur folder yang dikecualikan
+ Ini hanya akan mengecualikan pilihan bersama dengan subfoldernya di Simple Gallery. Anda bisa mengatur pengecualian di Setelan.
+ Kecualikan folder induk?
+ Mengecualikan folder akan membuatnya bersama subfoldernya tersembunyi hanya di Simple Gallery, namun masih bisa dilihat di aplikasi lain.\n\nJika Anda ingin menyembunyikannya dari aplikasi lain juga, gunakan fitur Sembunyikan.
+ Bersihkan daftar
+ Hapus semua folder dari daftar pengecualian? Ini tidak akan menghapus folder tersebut.
+ Folder tersembunyi
+ Atur folder tersembunyi
+ Sepertinya tidak ada folder tersembunyi dengan file \".nomedia\" didalamnya.
+
+
+ Folder yang disertakan
+ Atur folder yang disertakan
+ Tambah folder
+ Jika ada folder yang berisi file media, namun tidak dikenali oleh aplikasi ini, Anda bisa menambahkannya disini secara manual.\n\nMenambah beberapa item disini tidak akan mengecualikan folder yang lain.
+
+
+ Ubah ukuran
+ Ubah ukuran terpilih dan simpan
+ Lebar
+ Tinggi
+ Jaga aspek rasio
+ Harap masukkan resolusi dengan benar
+
+
+ Editor
+ Simpan
+ Rotasi
+ Jalur
+ Jalur gambar tidak valid
+ Gagal mengedit gambar
+ Edit dengan:
+ Tidak ada aplikasi editor gambar
+ Lokasi file tidak diketahui
+ Tidak dapat mengganti file sumber
+ Putar ke kiri
+ Putar ke kanan
+ Putar 180º
+ Balik
+ Balik horizontal
+ Balik vertikal
+ Edit dengan
+ Bebas
+ Lainnya
+
+
+ Simple Wallpaper
+ Setel wallpaper
+ Gagal menyetel sebagai wallpaper
+ Setel wallpaper dengan:
+ Menyetel wallpaper…
+ Wallpaper berhasil disetel
+ Aspek rasio potret
+ Aspek rasio landscape
+ Layar beranda
+ Layar kunci
+ Beranda dan layar kunci
+
+
+ Slideshow
+ Interval (detik):
+ Sertakan foto
+ Sertakan video
+ Sertakan GIF
+ Urutan acak
+ Animasi memudar
+ Mundur
+ Slideshow tanpa henti
+ Slideshow berakhir
+ Tidak ditemukan media untuk slideshow
+
+
+ Ubah jenis tampilan
+ Kotak
+ Daftar
+ Kelompokkan langsung subfolder
+
+
+ Kelompokkan menurut
+ Jangan kelompokkan file
+ Folder
+ Terakhir diubah
+ Tanggal diambil
+ Jenis file
+ Ekstensi
+
+
+ Putar video otomatis
+ Ingat posisi pemutaran terakhir
+ Tampil/sembunyikan nama file
+ Ulangi video
+ Animasi GIF di thumbnail
+ Kecerahan maksimal saat melihat di layar penuh
+ Pangkas thumbnail menjadi persegi
+ Tampilkan durasi video
+ Rotasi layar penuh dari
+ Pengaturan sistem
+ Rotasi perangkat
+ Aspek rasio
+ Background dan status bar hitam saat layar penuh
+ Gulir thumbnail secara horizontal
+ Otomatis sembunyikan sistem UI saat layar penuh
+ Hapus folder kosong setelah menghapus isinya
+ Izinkan mengontrol kecerahan foto dengan gerakan vertikal
+ Izinkan mengontrol kecerahan dan volume video dengan gerakan vertikal
+ Tampilkan jumlah folder media di tampilan utama
+ Ganti tombol Bagikan dengan Rotasi di menu layar penuh
+ Tampilkan detail tambahan saat layar penuh
+ Atur detail tambahan
+ Izinkan zoom satu jari di layar penuh
+ Izinkan mengganti media dengan mengklik sisi layar
+ Izinkan zoom gambar lebih dalam
+ Sembunyikan detail tambahan ketika status bar disembunyikan
+ Lakukan pemeriksaan ulang untuk menghindari file yang tidak valid
+ Tampilkan beberapa tombol tindakan dibawah layar
+ Tampilkan Sampah di layar folder
+ Zoom gambar mendalam
+ Tampilkan gambar dalam kualitas tertinggi
+ Tampilkan Sampah sebagai item terakhir di layar utama
+ Izinkan keluar dari layar penuh dengan menggeser kebawah
+
+
+ Thumbnail
+ Media layar penuh
+ Detail tambahan
+ Tindakan di bawah
+
+
+ Sesuaikan tombol tindakan bawah
+ Favorit
+ Tampil/sembunyikan file
+
+
+ Bagaimana cara menjadikan Simple Gallery sebagai aplikasi galeri default?
+ Pertama Anda harus menemukan galeri default saat ini di bagian Aplikasi di Setelan perangkat, lihatlah tombol yang seperti \"Buka secara default\", klik itu, lalu pilih \"Hapus default\".
+ Lain kali Anda mencoba membuka gambar atau video, Anda akan disuruh memilih aplikasi, dimana Anda bisa memilih Simple Gallery dan menjadikannya default.
+ Saya mengunci aplikasi dengan password, tapi saya lupa. Apa yang harus dilakukan?
+ Anda bisa menyelesaikannya dengan 2 cara. Anda bisa instal ulang aplikasi, atau cari aplikasi ini di Setelan perangkat dan pilih \"Hapus data\". Ini akan menyetel ulang semua setelan Anda, dan tidak akan menghapus file media apapun.
+ Bagaimana agar sebuah album selalu muncul paling atas di daftar?
+ Anda bisa menekan lama album tersebut dan pilih ikon Pin di menu tindakan, itu akan menaruhnya di atas daftar. Anda juga bisa menyematkan beberapa folder, item yang di-pin akan diurutkan berdasarkan metode urutan default.
+ Bagaimana cara mempercepat laju video?
+ Anda bisa mengklik teks durasi saat ini/maksimal di dekat penggeser durasi, itu akan memajukan atau memundurkan video.
+ Apa perbedaan antara menyembunyikan dan mengecualikan folder?
+ Mengecualikan tidak akan menampilkan folder di Simple Gallery, sedangkan Sembunyikan bekerja sesuai aturan sistem dan akan menyembunyikan folder juga dari aplikasi galeri yang lain. Cara kerjanya dengan membuat file \".nomedia\" kosong pada folder yang diinginkan, yang bisa Anda hapus juga dengan aplikasi file manager.
+ Mengapa folder dengan gambar album musik atau stiker muncul?
+ Kadang Anda melihat beberapa album yang tidak biasa muncul. Anda bisa dengan mudah menyembunyikannya dengan menekan lama dan pilih Kecualikan. Pada dialog berikutnya, Anda lalu bisa memilih folder induk, yang akan mencegah album terkait muncul kembali.
+ Ada folder berisi gambar namun tidak muncul, apa yang harus dilakukan?
+ Itu bisa disebabkan berbagai alasan, namun solusinya mudah. Pergi ke Setelan -> Atur folder yang disertakan, pilih Tambah dan cari folder yang diinginkan.
+ Bagaimana jika saya hanya ingin beberapa folder saja yang terlihat?
+ Menambahkan folder di Folder yang Disertakan tidak otomatis mengecualikan folder yang lain. Yang bisa Anda lakukan adalah pergi ke Setelan -> Atur Folder yang Dikecualikan, lalu kecualikan folder root \"/\", lalu tambahkan folder yang diinginkan di Setelan -> Atur Folder yang Disertakan.
+ Itu akan membuat folder yang dipilih saja yang muncul, dan jika sebuah folder disertakan dan dikecualikan secara bersamaan, folder tersebut akan muncul.
+ Gambar layar penuh terlihat pecah, bisakah ditingkatkan kualitasnya?
+ Ya, ada opsi di Setelan \"Ganti zoom mendalam dengan kualitas gambar yang lebih bagus\", Anda bisa menggunakannya. Ini akan meningkatkan kualitas gambar, namun gambar akan terlihat kabur jika Anda zoom terlalu banyak.
+ Bisakah saya meng-crop gambar dengan aplikasi ini?
+ Ya, Anda bisa melakukannya di Editor, dengan menyeret sudut gambar. Anda bisa masuk ke editor dengan menekan lama thumbnail gambar dan memilih Edit, atau pilih Edit dari tampilan layar penuh.
+ Bisakah saya mengelompokkan thumbnail file media?
+ Bisa, gunakan menu \"Kelompokkan menurut\" pada tampilan thumbnail. Anda bisa mengelompokkan file dengan berbagai kriteria, termasuk Tanggal Diambil. Jika Anda menggunakan fungsi \"Tampilkan semua isi folder\", Anda juga bisa mengelompokkan berdasarkan foldernya.
+ Tidak dapat mengurutkan berdasarkan Tanggal Diambil, bagaimana cara memperbaikinya?
+ Itu umumnya disebabkan karena file yang disalin dari tempat lain. Anda bisa memperbaikinya dengan memilih thumbnail file dan pilih \"Perbaiki Tanggal Diambil\".
+ Saya melihat beberapa pita warna pada gambar. Bagaimana saya meningkatkan kualitasnya?
+ Solusi saat ini untuk menampilkan gambar berfungsi dengan baik dalam sebagian besar kasus, namun jika Anda ingin kualitas gambar yang lebih baik, Anda bisa mengaktifkan \"Tampilkan gambar dalam kualitas tertinggi\" di setelan aplikasi, pada bagian \"Zoom gambar mendalam\".
+ Saya punya file/folder tersembunyi. Bagaimana cara memunculkannya?
+ Anda bisa memilih menu \"Tampilkan sementara file tersembunyi\" di layar utama, atau \"Tampilkan file tersembunyi\" di setelan aplikasi untuk menampilkannya. Jika Anda tidak ingin menyembunyikannya, tekan lama dan pilih \"Jangan sembunyikan\". Folder disembunyikan dengan menambahkan file \".nomedia\" di dalamnya, Anda bisa menghapus file tersebut dengan aplikasi file manager.
+
+
+
+ Aplikasi galeri untuk melihat foto dan video tanpa iklan.
+
+ Aplikasi galeri dengan banyak kustomisasi dan mampu menampilkan banyak jenis gambar dan video termasuk SVG, RAW, panorama foto dan video.
+
+ Aplikasi ini open source, tidak berisi iklan atau izin yang tidak diperlukan.
+
+ Beberapa fiturnya antara lain:
+ 1. Pencarian
+ 2. Slideshow
+ 3. Dukungan notch (layar berponi)
+ 4. Pin folder di atas
+ 5. Filter media berdasarkan jenis
+ 6. Keranjang sampah untuk memulihkan file
+ 7. Kunci orientasi layar penuh
+ 8. Tandai file favorit agar mudah diakses
+ 9. Keluar dari layar penuh dengan menggeser ke bawah
+ 10. Editor bawaan untuk mengedit dan menambahkan filter
+ 11. Perlindungan password untuk item tersembunyi atau mengunci aplikasi
+ 12. Ubah jumlah kolom thumbnail lewat gerakan atau menu
+ 13. Sesuaikan tombol tindakan di bawah layar penuh untuk akses cepat
+ 14. Menampilkan detail tambahan di layar penuh dengan properti file yang diinginkan
+ 15. Berbagai cara untuk mengurutkan atau mengelompokkan item, dengan naik atau turun
+ 16. Sembunyikan folder (berpengaruh di aplikasi lain), kecualikan folder (hanya berpengaruh di Simple Gallery)
+
+ Izin sidik jari diperlukan untuk mengunci item tersembunyi, mengunci aplikasi, atau melindungi agar file tidak dihapus.
+
+ Aplikasi ini hanyalah bagian dari rangkaian aplikasi saya. Anda bisa menemukan aplikasi saya lainnya di https://www.simplemobiletools.com
+
+
+
+
From 40616a6bee80747500706d4ceb1dba0e4335e383 Mon Sep 17 00:00:00 2001
From: kniddl <10777535+kniddl@users.noreply.github.com>
Date: Mon, 10 Dec 2018 13:52:25 +0100
Subject: [PATCH 08/99] Update German string
---
app/src/main/res/values-de/strings.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 141cad8b7..1e8d4ddbd 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -89,7 +89,7 @@
Vertikal spiegeln
Bearbeiten mit:
Beliebiges
- Other
+ Anderes
Schlichter Hintergrund
From b64f1647420ad6a882efdf2e28bf8130cc45a09f Mon Sep 17 00:00:00 2001
From: tibbi
Date: Tue, 11 Dec 2018 12:47:18 +0100
Subject: [PATCH 09/99] delete invalid files from cache at loading thumbnails
---
.../gallery/pro/activities/MediaActivity.kt | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt
index 791cabd78..a8390793d 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt
@@ -585,7 +585,15 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
mCurrAsyncTask?.stopFetching()
mCurrAsyncTask = GetMediaAsynctask(applicationContext, mPath, mIsGetImageIntent, mIsGetVideoIntent, mShowAll) {
Thread {
- gotMedia(it)
+ val oldMedia = mMedia.clone() as ArrayList
+ val newMedia = it
+ gotMedia(newMedia, false)
+ try {
+ oldMedia.filter { !newMedia.contains(it) }.mapNotNull { it as? Medium }.filter { !File(it.path).exists() }.forEach {
+ mMediumDao.deleteMediumPath(it.path)
+ }
+ } catch (e: Exception) {
+ }
}.start()
}
@@ -820,7 +828,7 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
}
}
- private fun gotMedia(media: ArrayList, isFromCache: Boolean = false) {
+ private fun gotMedia(media: ArrayList, isFromCache: Boolean) {
mIsGettingMedia = false
checkLastMediaChanged()
mMedia = media
From f91f1819b0b25d4822b042f33ef9521954a982dc Mon Sep 17 00:00:00 2001
From: tibbi
Date: Tue, 11 Dec 2018 12:47:25 +0100
Subject: [PATCH 10/99] update kotlin to 1.3.11
---
build.gradle | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/build.gradle b/build.gradle
index 1cfbb3a29..d93366c1c 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,7 +1,7 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
- ext.kotlin_version = '1.3.10'
+ ext.kotlin_version = '1.3.11'
repositories {
google()
From 87436720b8a3b637e422b8ee37cce9d9679614ef Mon Sep 17 00:00:00 2001
From: tibbi
Date: Tue, 11 Dec 2018 21:51:27 +0100
Subject: [PATCH 11/99] updating SubsamplingScaleImageView to 4.0.0
---
app/build.gradle | 5 +++--
.../gallery/pro/fragments/PhotoFragment.kt | 21 ++++++++++++++-----
2 files changed, 19 insertions(+), 7 deletions(-)
diff --git a/app/build.gradle b/app/build.gradle
index aa7e98b3c..818617211 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -57,7 +57,7 @@ android {
}
dependencies {
- implementation 'com.simplemobiletools:commons:5.5.4'
+ implementation 'com.simplemobiletools:commons:5.5.15'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'it.sephiroth.android.exif:library:1.0.1'
@@ -77,7 +77,8 @@ dependencies {
annotationProcessor 'androidx.room:room-compiler:2.0.0'
//implementation 'com.davemorrissey.labs:subsampling-scale-image-view:3.10.0'
- implementation 'com.github.tibbi:subsampling-scale-image-view:v3.10.1-fork'
+ //implementation 'com.github.tibbi:subsampling-scale-image-view:v3.10.1-fork'
+ implementation 'com.github.tibbi:subsampling-scale-image-view:4.0.0'
// implementation 'com.github.chrisbanes:PhotoView:2.1.4'
implementation 'com.github.tibbi:PhotoView:2.2.1-fork'
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt
index 0580e2a48..372bc7b0c 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/fragments/PhotoFragment.kt
@@ -26,6 +26,9 @@ import com.bumptech.glide.request.RequestListener
import com.bumptech.glide.request.RequestOptions
import com.davemorrissey.labs.subscaleview.ImageSource
import com.davemorrissey.labs.subscaleview.SubsamplingScaleImageView
+import com.davemorrissey.labs.subscaleview.decoder.DecoderFactory
+import com.davemorrissey.labs.subscaleview.decoder.ImageDecoder
+import com.davemorrissey.labs.subscaleview.decoder.ImageRegionDecoder
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.OTG_PATH
import com.simplemobiletools.gallery.pro.R
@@ -377,18 +380,26 @@ class PhotoFragment : ViewPagerFragment() {
val path = getPathToLoad(medium)
isSubsamplingVisible = true
+ val bitmapDecoder = object : DecoderFactory {
+ override fun make() = PicassoDecoder(path, Picasso.get(), rotation)
+ }
+
+ val regionDecoder = object : DecoderFactory {
+ override fun make() = PicassoRegionDecoder()
+ }
+
view.subsampling_view.apply {
setMaxTileSize(if (context!!.config.showHighestQuality) Integer.MAX_VALUE else 4096)
setMinimumTileDpi(if (context!!.config.showHighestQuality) -1 else getMinTileDpi())
background = ColorDrawable(Color.TRANSPARENT)
- setBitmapDecoderFactory { PicassoDecoder(path, Picasso.get(), rotation) }
- setRegionDecoderFactory { PicassoRegionDecoder() }
+ setBitmapDecoderFactory(bitmapDecoder)
+ setRegionDecoderFactory(regionDecoder)
maxScale = 10f
beVisible()
isQuickScaleEnabled = context.config.oneFingerZoom
setResetScaleOnSizeChange(false)
setImage(ImageSource.uri(path))
- orientation = rotation
+ setOrientation(rotation)
setEagerLoadingEnabled(false)
setOnImageEventListener(object : SubsamplingScaleImageView.OnImageEventListener {
override fun onImageLoaded() {
@@ -402,7 +413,7 @@ class PhotoFragment : ViewPagerFragment() {
mOriginalSubsamplingScale = scale
}
- override fun onTileLoadError(e: Exception?) {
+ override fun onTileLoadError(e: Exception) {
}
override fun onPreviewReleased() {
@@ -415,7 +426,7 @@ class PhotoFragment : ViewPagerFragment() {
beGone()
}
- override fun onPreviewLoadError(e: Exception?) {
+ override fun onPreviewLoadError(e: Exception) {
background = ColorDrawable(Color.TRANSPARENT)
isSubsamplingVisible = false
beGone()
From 7b23d5ecd7f9f0c949f5f53517f2995a0c680236 Mon Sep 17 00:00:00 2001
From: Pzqqt <821026875@qq.com>
Date: Wed, 12 Dec 2018 21:36:00 +0800
Subject: [PATCH 12/99] Update strings.xml
---
app/src/main/res/values-zh-rCN/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 6dfe0a550..9f2d35ee9 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -89,7 +89,7 @@
垂直翻转
编辑方式
自由
- Other
+ 其他
简约壁纸
@@ -140,7 +140,7 @@
GIF 缩略图
浏览时最大亮度
裁剪缩略图
- Show video durations
+ 显示视频时长
全屏方向
系统设置
设备方向
From f5248d5d53dbd2da73b9f12d5034e189874947c5 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Wed, 12 Dec 2018 19:29:05 +0100
Subject: [PATCH 13/99] add a checkbox for grouping direct subfolders at the
Change View dialog
---
app/build.gradle | 2 +-
.../gallery/pro/activities/MainActivity.kt | 10 +---
.../pro/dialogs/ChangeViewTypeDialog.kt | 38 +++++++++++++
.../gallery/pro/helpers/Config.kt | 4 ++
.../gallery/pro/helpers/Constants.kt | 1 +
.../res/layout/dialog_change_view_type.xml | 54 +++++++++++++++++++
6 files changed, 100 insertions(+), 9 deletions(-)
create mode 100644 app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/ChangeViewTypeDialog.kt
create mode 100644 app/src/main/res/layout/dialog_change_view_type.xml
diff --git a/app/build.gradle b/app/build.gradle
index 818617211..f76beb22c 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -57,7 +57,7 @@ android {
}
dependencies {
- implementation 'com.simplemobiletools:commons:5.5.15'
+ implementation 'com.simplemobiletools:commons:5.5.16'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.8.0'
implementation 'androidx.multidex:multidex:2.0.0'
implementation 'it.sephiroth.android.exif:library:1.0.1'
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 2ac01140e..ec95f9935 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -19,11 +19,9 @@ import androidx.core.view.MenuItemCompat
import androidx.recyclerview.widget.RecyclerView
import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog
import com.simplemobiletools.commons.dialogs.FilePickerDialog
-import com.simplemobiletools.commons.dialogs.RadioGroupDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.commons.helpers.*
import com.simplemobiletools.commons.models.FileDirItem
-import com.simplemobiletools.commons.models.RadioItem
import com.simplemobiletools.commons.models.Release
import com.simplemobiletools.commons.views.MyGridLayoutManager
import com.simplemobiletools.commons.views.MyRecyclerView
@@ -32,6 +30,7 @@ import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.pro.adapters.DirectoryAdapter
import com.simplemobiletools.gallery.pro.databases.GalleryDatabase
import com.simplemobiletools.gallery.pro.dialogs.ChangeSortingDialog
+import com.simplemobiletools.gallery.pro.dialogs.ChangeViewTypeDialog
import com.simplemobiletools.gallery.pro.dialogs.FilterMediaDialog
import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.pro.helpers.*
@@ -451,12 +450,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
private fun changeViewType() {
- val items = arrayListOf(
- RadioItem(VIEW_TYPE_GRID, getString(R.string.grid)),
- RadioItem(VIEW_TYPE_LIST, getString(R.string.list)))
-
- RadioGroupDialog(this, items, config.viewTypeFolders) {
- config.viewTypeFolders = it as Int
+ ChangeViewTypeDialog(this) {
invalidateOptionsMenu()
setupLayoutManager()
val dirs = getCurrentlyDisplayedDirs()
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/ChangeViewTypeDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/ChangeViewTypeDialog.kt
new file mode 100644
index 000000000..b534b5c3e
--- /dev/null
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/ChangeViewTypeDialog.kt
@@ -0,0 +1,38 @@
+package com.simplemobiletools.gallery.pro.dialogs
+
+import android.view.View
+import androidx.appcompat.app.AlertDialog
+import com.simplemobiletools.commons.activities.BaseSimpleActivity
+import com.simplemobiletools.commons.extensions.setupDialogStuff
+import com.simplemobiletools.gallery.pro.R
+import com.simplemobiletools.gallery.pro.extensions.config
+import com.simplemobiletools.gallery.pro.helpers.VIEW_TYPE_GRID
+import com.simplemobiletools.gallery.pro.helpers.VIEW_TYPE_LIST
+import kotlinx.android.synthetic.main.dialog_change_view_type.view.*
+
+class ChangeViewTypeDialog(val activity: BaseSimpleActivity, val callback: () -> Unit) {
+ private var view: View
+ private var config = activity.config
+
+ init {
+ view = activity.layoutInflater.inflate(R.layout.dialog_change_view_type, null).apply {
+ val viewToCheck = if (config.viewTypeFolders == VIEW_TYPE_GRID) change_view_type_dialog_radio_grid.id else change_view_type_dialog_radio_list.id
+ change_view_type_dialog_radio.check(viewToCheck)
+ change_view_type_dialog_group_direct_subfolders.isChecked = config.groupDirectSubfolders
+ }
+
+ AlertDialog.Builder(activity)
+ .setPositiveButton(R.string.ok) { dialog, which -> dialogConfirmed() }
+ .setNegativeButton(R.string.cancel, null)
+ .create().apply {
+ activity.setupDialogStuff(view, this)
+ }
+ }
+
+ private fun dialogConfirmed() {
+ val viewType = if (view.change_view_type_dialog_radio.checkedRadioButtonId == view.change_view_type_dialog_radio_grid.id) VIEW_TYPE_GRID else VIEW_TYPE_LIST
+ config.viewTypeFolders = viewType
+ config.groupDirectSubfolders = view.change_view_type_dialog_group_direct_subfolders.isChecked
+ callback()
+ }
+}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt
index e25a4073d..3016cf54f 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt
@@ -423,4 +423,8 @@ class Config(context: Context) : BaseConfig(context) {
var lastEditorCropOtherAspectRatioY: Int
get() = prefs.getInt(LAST_EDITOR_CROP_OTHER_ASPECT_RATIO_Y, 1)
set(lastEditorCropOtherAspectRatioY) = prefs.edit().putInt(LAST_EDITOR_CROP_OTHER_ASPECT_RATIO_Y, lastEditorCropOtherAspectRatioY).apply()
+
+ var groupDirectSubfolders: Boolean
+ get() = prefs.getBoolean(GROUP_DIRECT_SUBFOLDERS, false)
+ set(groupDirectSubfolders) = prefs.edit().putBoolean(GROUP_DIRECT_SUBFOLDERS, groupDirectSubfolders).apply()
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt
index f868a1747..03d5b8436 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt
@@ -71,6 +71,7 @@ const val ALLOW_DOWN_GESTURE = "allow_down_gesture"
const val LAST_EDITOR_CROP_ASPECT_RATIO = "last_editor_crop_aspect_ratio"
const val LAST_EDITOR_CROP_OTHER_ASPECT_RATIO_X = "last_editor_crop_other_aspect_ratio_x"
const val LAST_EDITOR_CROP_OTHER_ASPECT_RATIO_Y = "last_editor_crop_other_aspect_ratio_y"
+const val GROUP_DIRECT_SUBFOLDERS = "group_direct_subfolders"
// slideshow
const val SLIDESHOW_INTERVAL = "slideshow_interval"
diff --git a/app/src/main/res/layout/dialog_change_view_type.xml b/app/src/main/res/layout/dialog_change_view_type.xml
new file mode 100644
index 000000000..003692bb9
--- /dev/null
+++ b/app/src/main/res/layout/dialog_change_view_type.xml
@@ -0,0 +1,54 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
From 7dcfa167a79c6b39b44c770506f16e9a993a043c Mon Sep 17 00:00:00 2001
From: tibbi
Date: Wed, 12 Dec 2018 21:32:47 +0100
Subject: [PATCH 14/99] handle direct subfolder grouping if selected so
---
.../gallery/pro/activities/MainActivity.kt | 55 ++++++++++++++++---
1 file changed, 48 insertions(+), 7 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index ec95f9935..25bac3170 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -453,9 +453,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
ChangeViewTypeDialog(this) {
invalidateOptionsMenu()
setupLayoutManager()
- val dirs = getCurrentlyDisplayedDirs()
directories_grid.adapter = null
- setupAdapter(dirs)
+ setupAdapter(mDirs)
}
}
@@ -762,10 +761,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
private fun gotDirectories(newDirs: ArrayList) {
- // if hidden item showing is disabled but all Favorite items are hidden, hide the Favorites folder
mIsGettingDirs = false
mShouldStopFetching = false
+ // if hidden item showing is disabled but all Favorite items are hidden, hide the Favorites folder
if (!config.shouldShowHidden) {
val favoritesFolder = newDirs.firstOrNull { it.areFavorites() }
if (favoritesFolder != null && favoritesFolder.tmb.getFilenameFromPath().startsWith('.')) {
@@ -924,16 +923,57 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
}
+ private fun getDirectParentSubfolders(folders: HashSet): HashSet {
+ val internalPath = internalStoragePath
+ val sdPath = sdCardPath
+ val currentPaths = HashSet()
+ folders.forEach {
+ if (it != internalPath && it != sdPath) {
+ val parent = File(it).parent
+ currentPaths.add(parent)
+ }
+ }
+
+ var areDirectSubfoldersAvailable = false
+ currentPaths.forEach {
+ val path = it
+ currentPaths.forEach {
+ if (it != path && it.startsWith(path)) {
+ areDirectSubfoldersAvailable = true
+ }
+ }
+ }
+
+ folders.clear()
+ folders.addAll(currentPaths)
+ return if (areDirectSubfoldersAvailable) {
+ getDirectParentSubfolders(folders)
+ } else {
+ folders
+ }
+ }
+
private fun checkPlaceholderVisibility(dirs: ArrayList) {
directories_empty_text_label.beVisibleIf(dirs.isEmpty() && mLoadedInitialPhotos)
directories_empty_text.beVisibleIf(dirs.isEmpty() && mLoadedInitialPhotos)
directories_grid.beVisibleIf(directories_empty_text_label.isGone())
}
- private fun showSortedDirs(dirs: ArrayList) {
+ private fun showSortedDirs(dirs: ArrayList, checkSubfolders: Boolean = true) {
val updatedDirs = getUniqueSortedDirs(dirs).toMutableList() as ArrayList
+ val dirsToShow = if (checkSubfolders) getDirsToShow(updatedDirs) else updatedDirs
runOnUiThread {
- (directories_grid.adapter as? DirectoryAdapter)?.updateDirs(updatedDirs)
+ (directories_grid.adapter as? DirectoryAdapter)?.updateDirs(dirsToShow)
+ }
+ }
+
+ private fun getDirsToShow(dirs: ArrayList): ArrayList {
+ return if (config.groupDirectSubfolders) {
+ val dirFolders = dirs.map { it.path }.sorted().toMutableSet() as HashSet
+ val foldersToShow = getDirectParentSubfolders(dirFolders)
+ dirs.filter { foldersToShow.contains(it.path) } as ArrayList
+ } else {
+ dirs
}
}
@@ -972,10 +1012,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
private fun setupAdapter(dirs: ArrayList) {
val currAdapter = directories_grid.adapter
+ val dirsToShow = getDirsToShow(dirs)
if (currAdapter == null) {
initZoomListener()
val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller
- DirectoryAdapter(this, dirs.clone() as ArrayList, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) {
+ DirectoryAdapter(this, dirsToShow.clone() as ArrayList, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) {
val path = (it as Directory).path
if (path != config.tempFolderPath) {
itemClicked(path)
@@ -985,7 +1026,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
directories_grid.adapter = this
}
} else {
- showSortedDirs(dirs)
+ showSortedDirs(dirsToShow, false)
}
getRecyclerAdapter()?.dirs?.apply {
From e3fcd3c84b3c0407b5c5dcfe951101be1aa7c470 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Wed, 12 Dec 2018 23:31:12 +0100
Subject: [PATCH 15/99] tweak the way folders at grouping direct subfolders are
checked
---
.../gallery/pro/activities/MainActivity.kt | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 25bac3170..3ad0ce15d 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -926,11 +926,16 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
private fun getDirectParentSubfolders(folders: HashSet): HashSet {
val internalPath = internalStoragePath
val sdPath = sdCardPath
- val currentPaths = HashSet()
+ val currentPaths = LinkedHashSet()
folders.forEach {
+ val path = it
if (it != internalPath && it != sdPath) {
- val parent = File(it).parent
- currentPaths.add(parent)
+ if (folders.any { it != path && (File(path).parent == it || File(it).parent == File(path).parent) }) {
+ val parent = File(it).parent
+ currentPaths.add(parent)
+ } else {
+ currentPaths.add(it)
+ }
}
}
@@ -938,7 +943,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
currentPaths.forEach {
val path = it
currentPaths.forEach {
- if (it != path && it.startsWith(path)) {
+ if (it != path && File(it).parent == path) {
areDirectSubfoldersAvailable = true
}
}
From d654eca1f27c3a1a5fdf4e7d0606335063a30c33 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Thu, 13 Dec 2018 12:40:58 +0100
Subject: [PATCH 16/99] replacing some "it"s with "path"s
---
.../gallery/pro/activities/MainActivity.kt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 3ad0ce15d..699fcf19f 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -929,12 +929,12 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
val currentPaths = LinkedHashSet()
folders.forEach {
val path = it
- if (it != internalPath && it != sdPath) {
+ if (path != internalPath && path != sdPath) {
if (folders.any { it != path && (File(path).parent == it || File(it).parent == File(path).parent) }) {
- val parent = File(it).parent
+ val parent = File(path).parent
currentPaths.add(parent)
} else {
- currentPaths.add(it)
+ currentPaths.add(path)
}
}
}
From 77cff3dd17808dbe4ff07bebe28f693041948a7b Mon Sep 17 00:00:00 2001
From: Guillaume
Date: Thu, 13 Dec 2018 15:54:06 +0100
Subject: [PATCH 17/99] Dutch
---
app/src/main/res/values-nl/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 0e3a92429..175650e03 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -160,7 +160,7 @@
Verder inzoomen mogelijk maken
Uitgebreide informatie niet tonen als de statusbalk is verborgen
Ongeldige bestanden verbergen
- Enkele actieknoppen onderaan het scherm tonen
+ Enkele actieknoppen onder aan het scherm tonen
Prullenbak weergeven in de mapweergave
Afbeeldingen ver inzoomen
Afbeeldingen in de hoogst mogelijke kwaliteit weergeven
@@ -171,7 +171,7 @@
Miniatuurvoorbeelden
Volledig scherm
Uitgebreide informatie
- Acties onderaan het scherm
+ Acties onder aan het scherm
Actieknoppen onderaan beheren
From a0798bcd295ca63334dbbb673c4c4b2ab74c056c Mon Sep 17 00:00:00 2001
From: tibbi
Date: Thu, 13 Dec 2018 16:20:00 +0100
Subject: [PATCH 18/99] unify the directories funnel through which they are
sorted, filtered etc
---
.../gallery/pro/activities/MainActivity.kt | 54 +++++++------------
1 file changed, 19 insertions(+), 35 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 699fcf19f..b7bdd5d4d 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -313,7 +313,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
override fun onQueryTextChange(newText: String): Boolean {
if (mIsSearchOpen) {
- searchQueryChanged(newText)
+ setupAdapter(mDirs, newText)
}
return true
}
@@ -332,25 +332,13 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
if (mIsSearchOpen) {
mIsSearchOpen = false
directories_refresh_layout.isEnabled = config.enablePullToRefresh
- searchQueryChanged("")
+ setupAdapter(mDirs, "")
}
return true
}
})
}
- private fun searchQueryChanged(text: String) {
- Thread {
- val filtered = getUniqueSortedDirs(mDirs).filter { it.name.contains(text, true) } as ArrayList
- filtered.sortBy { !it.name.startsWith(text, true) }
-
- runOnUiThread {
- getRecyclerAdapter()?.updateDirs(filtered)
- measureRecyclerViewContent(filtered)
- }
- }.start()
- }
-
private fun removeTempFolder() {
if (config.tempFolderPath.isNotEmpty()) {
val newFolder = File(config.tempFolderPath)
@@ -828,7 +816,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
types = newDir.types
}
- showSortedDirs(dirs)
+ setupAdapter(dirs)
// update directories and media files in the local db, delete invalid items
updateDBDirectory(directory, mDirectoryDao)
@@ -855,7 +843,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
mDirectoryDao.deleteDirPath(it.path)
}
dirs.removeAll(dirsToRemove)
- showSortedDirs(dirs)
+ setupAdapter(dirs)
}
val foldersToScan = mediaFetcher.getFoldersToScan()
@@ -892,7 +880,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
val newDir = createDirectoryFromMedia(folder, newMedia, albumCovers, hiddenString, includedFolders, isSortingAscending)
dirs.add(newDir)
- showSortedDirs(dirs)
+ setupAdapter(dirs)
mDirectoryDao.insert(newDir)
if (folder != RECYCLE_BIN) {
mMediumDao.insertAll(newMedia)
@@ -964,14 +952,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
directories_grid.beVisibleIf(directories_empty_text_label.isGone())
}
- private fun showSortedDirs(dirs: ArrayList, checkSubfolders: Boolean = true) {
- val updatedDirs = getUniqueSortedDirs(dirs).toMutableList() as ArrayList
- val dirsToShow = if (checkSubfolders) getDirsToShow(updatedDirs) else updatedDirs
- runOnUiThread {
- (directories_grid.adapter as? DirectoryAdapter)?.updateDirs(dirsToShow)
- }
- }
-
private fun getDirsToShow(dirs: ArrayList): ArrayList {
return if (config.groupDirectSubfolders) {
val dirFolders = dirs.map { it.path }.sorted().toMutableSet() as HashSet
@@ -1015,29 +995,33 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
return Directory(null, path, thumbnail, dirName, curMedia.size, lastModified, dateTaken, size, getPathLocation(path), mediaTypes)
}
- private fun setupAdapter(dirs: ArrayList) {
+ private fun setupAdapter(dirs: ArrayList, textToSearch: String = "") {
val currAdapter = directories_grid.adapter
- val dirsToShow = getDirsToShow(dirs)
+ val updatedDirs = getUniqueSortedDirs(dirs).toMutableList() as ArrayList
+ var dirsToShow = getDirsToShow(updatedDirs).clone() as ArrayList
if (currAdapter == null) {
initZoomListener()
val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller
- DirectoryAdapter(this, dirsToShow.clone() as ArrayList, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) {
+ DirectoryAdapter(this, dirsToShow, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) {
val path = (it as Directory).path
if (path != config.tempFolderPath) {
itemClicked(path)
}
+ measureRecyclerViewContent(dirsToShow)
}.apply {
setupZoomListener(mZoomListener)
directories_grid.adapter = this
}
+ setupScrollDirection()
} else {
- showSortedDirs(dirsToShow, false)
+ if (textToSearch.isNotEmpty()) {
+ dirsToShow = dirsToShow.filter { it.name.contains(textToSearch, true) }.sortedBy { !it.name.startsWith(textToSearch, true) }.toMutableList() as ArrayList
+ }
+ runOnUiThread {
+ (directories_grid.adapter as? DirectoryAdapter)?.updateDirs(dirsToShow)
+ measureRecyclerViewContent(dirsToShow)
+ }
}
-
- getRecyclerAdapter()?.dirs?.apply {
- measureRecyclerViewContent(this)
- }
- setupScrollDirection()
}
private fun setupScrollDirection() {
@@ -1091,7 +1075,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
if (invalidDirs.isNotEmpty()) {
dirs.removeAll(invalidDirs)
- showSortedDirs(dirs)
+ setupAdapter(dirs)
invalidDirs.forEach {
mDirectoryDao.deleteDirPath(it.path)
}
From 32012061a65a9c059e2e181359126210d3eb1f81 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Thu, 13 Dec 2018 16:34:41 +0100
Subject: [PATCH 19/99] remove another redundant function for getting unique
directories
---
.../gallery/pro/activities/MainActivity.kt | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index b7bdd5d4d..d09dfbcea 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -962,11 +962,6 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
}
- private fun getUniqueSortedDirs(dirs: ArrayList): ArrayList {
- val distinctDirs = dirs.distinctBy { it.path.getDistinctPath() } as ArrayList
- return getSortedDirectories(distinctDirs)
- }
-
private fun createDirectoryFromMedia(path: String, curMedia: ArrayList, albumCovers: ArrayList, hiddenString: String,
includedFolders: MutableSet, isSortingAscending: Boolean): Directory {
var thumbnail = curMedia.firstOrNull { getDoesFilePathExist(it.path) }?.path ?: ""
@@ -997,8 +992,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
private fun setupAdapter(dirs: ArrayList, textToSearch: String = "") {
val currAdapter = directories_grid.adapter
- val updatedDirs = getUniqueSortedDirs(dirs).toMutableList() as ArrayList
- var dirsToShow = getDirsToShow(updatedDirs).clone() as ArrayList
+ val distinctDirs = dirs.distinctBy { it.path.getDistinctPath() }.toMutableList() as ArrayList
+ val sortedDirs = getSortedDirectories(distinctDirs)
+ var dirsToShow = getDirsToShow(sortedDirs).clone() as ArrayList
+
if (currAdapter == null) {
initZoomListener()
val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller
From 6bb69e3d9f6050d0c6ab6fbb5ff67985d32c3584 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Fri, 14 Dec 2018 21:07:00 +0100
Subject: [PATCH 20/99] show an additional dialog before displaying the OTG
permission one
---
.../gallery/pro/activities/MainActivity.kt | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index d09dfbcea..0b6bf1658 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -17,6 +17,7 @@ import android.widget.Toast
import androidx.appcompat.widget.SearchView
import androidx.core.view.MenuItemCompat
import androidx.recyclerview.widget.RecyclerView
+import com.simplemobiletools.commons.dialogs.ConfirmationDialog
import com.simplemobiletools.commons.dialogs.CreateNewFolderDialog
import com.simplemobiletools.commons.dialogs.FilePickerDialog
import com.simplemobiletools.commons.extensions.*
@@ -356,8 +357,10 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
Thread {
if (hasOTGConnected()) {
runOnUiThread {
- handleOTGPermission {
- config.addIncludedFolder(OTG_PATH)
+ ConfirmationDialog(this, getString(R.string.otg_detected), positive = R.string.ok, negative = 0) {
+ handleOTGPermission {
+ config.addIncludedFolder(OTG_PATH)
+ }
}
}
config.wasOTGHandled = true
From 74cfe5167e83168282cafb1e959b4dcbc53d3f1b Mon Sep 17 00:00:00 2001
From: tibbi
Date: Fri, 14 Dec 2018 21:40:17 +0100
Subject: [PATCH 21/99] do not make the Directory model Serializable
---
.../com/simplemobiletools/gallery/pro/models/Directory.kt | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Directory.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Directory.kt
index c5b90b860..8b90b8bdf 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Directory.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Directory.kt
@@ -12,7 +12,6 @@ import com.simplemobiletools.commons.helpers.SORT_BY_PATH
import com.simplemobiletools.commons.helpers.SORT_BY_SIZE
import com.simplemobiletools.gallery.pro.helpers.FAVORITES
import com.simplemobiletools.gallery.pro.helpers.RECYCLE_BIN
-import java.io.Serializable
@Entity(tableName = "directories", indices = [Index(value = ["path"], unique = true)])
data class Directory(
@@ -25,11 +24,7 @@ data class Directory(
@ColumnInfo(name = "date_taken") var taken: Long,
@ColumnInfo(name = "size") var size: Long,
@ColumnInfo(name = "location") val location: Int,
- @ColumnInfo(name = "media_types") var types: Int) : Serializable {
-
- companion object {
- private const val serialVersionUID = -6553345863555455L
- }
+ @ColumnInfo(name = "media_types") var types: Int) {
fun getBubbleText(sorting: Int) = when {
sorting and SORT_BY_NAME != 0 -> name
From 3d47eac4e391fe87eba2cca53757ceb6b31368d0 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Fri, 14 Dec 2018 22:02:03 +0100
Subject: [PATCH 22/99] show the sum of all subfolder media counts with "Group
direct subfolders"
---
.../gallery/pro/activities/MainActivity.kt | 22 ++++++++++++++++++-
.../gallery/pro/adapters/DirectoryAdapter.kt | 2 +-
.../gallery/pro/models/Directory.kt | 12 +++++-----
3 files changed, 28 insertions(+), 8 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 0b6bf1658..db11c197b 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -957,10 +957,30 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
private fun getDirsToShow(dirs: ArrayList): ArrayList {
return if (config.groupDirectSubfolders) {
+ dirs.forEach { it.subfoldersMediaCount = it.mediaCnt }
val dirFolders = dirs.map { it.path }.sorted().toMutableSet() as HashSet
val foldersToShow = getDirectParentSubfolders(dirFolders)
- dirs.filter { foldersToShow.contains(it.path) } as ArrayList
+ val newDirs = dirs.filter { foldersToShow.contains(it.path) } as ArrayList
+
+ // update the directory media counts, add all subfolder media counts to it
+ dirs.forEach {
+ val mainDir = it
+ var longestSharedPath = ""
+ newDirs.forEach {
+ if (it.path != mainDir.path && mainDir.path.startsWith(it.path, true) && it.path.length > longestSharedPath.length) {
+ longestSharedPath = it.path
+ }
+ }
+
+ val mainFolder = newDirs.firstOrNull { it.path == longestSharedPath }
+ if (mainFolder != null) {
+ mainFolder.subfoldersMediaCount += mainDir.mediaCnt
+ }
+ }
+
+ newDirs
} else {
+ dirs.forEach { it.subfoldersMediaCount = it.mediaCnt }
dirs
}
}
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 b4241f18e..61b53d188 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
@@ -503,7 +503,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList TYPE_VIDEOS
directory.tmb.isGif() -> TYPE_GIFS
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Directory.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Directory.kt
index 8b90b8bdf..7c968ce44 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Directory.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Directory.kt
@@ -1,9 +1,6 @@
package com.simplemobiletools.gallery.pro.models
-import androidx.room.ColumnInfo
-import androidx.room.Entity
-import androidx.room.Index
-import androidx.room.PrimaryKey
+import androidx.room.*
import com.simplemobiletools.commons.extensions.formatDate
import com.simplemobiletools.commons.extensions.formatSize
import com.simplemobiletools.commons.helpers.SORT_BY_DATE_MODIFIED
@@ -23,8 +20,11 @@ data class Directory(
@ColumnInfo(name = "last_modified") var modified: Long,
@ColumnInfo(name = "date_taken") var taken: Long,
@ColumnInfo(name = "size") var size: Long,
- @ColumnInfo(name = "location") val location: Int,
- @ColumnInfo(name = "media_types") var types: Int) {
+ @ColumnInfo(name = "location") var location: Int,
+ @ColumnInfo(name = "media_types") var types: Int,
+ @Ignore var subfoldersMediaCount: Int = 0) { // used with "Group direct subfolders" enabled to count subfolder media counts
+
+ constructor() : this(null, "", "", "", 0, 0L, 0L, 0L, 0, 0, 0)
fun getBubbleText(sorting: Int) = when {
sorting and SORT_BY_NAME != 0 -> name
From 9488795de84dd8d0a0195b4a972e1773512cb048 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Fri, 14 Dec 2018 22:39:42 +0100
Subject: [PATCH 23/99] show subfolders count at the main screen, if grouping
is enabled
---
.../gallery/pro/activities/MainActivity.kt | 7 ++++++-
.../gallery/pro/adapters/DirectoryAdapter.kt | 3 ++-
.../com/simplemobiletools/gallery/pro/models/Directory.kt | 7 +++++--
3 files changed, 13 insertions(+), 4 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index db11c197b..39d5a7b85 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -957,7 +957,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
private fun getDirsToShow(dirs: ArrayList): ArrayList {
return if (config.groupDirectSubfolders) {
- dirs.forEach { it.subfoldersMediaCount = it.mediaCnt }
+ dirs.forEach {
+ it.subfoldersCount = 1
+ it.subfoldersMediaCount = it.mediaCnt
+ }
+
val dirFolders = dirs.map { it.path }.sorted().toMutableSet() as HashSet
val foldersToShow = getDirectParentSubfolders(dirFolders)
val newDirs = dirs.filter { foldersToShow.contains(it.path) } as ArrayList
@@ -968,6 +972,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
var longestSharedPath = ""
newDirs.forEach {
if (it.path != mainDir.path && mainDir.path.startsWith(it.path, true) && it.path.length > longestSharedPath.length) {
+ it.subfoldersCount += 1
longestSharedPath = it.path
}
}
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 61b53d188..bab6956e0 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
@@ -38,6 +38,7 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList name
From 1e47a6dd2f417b9d4c6c0cdee5817a43c780571c Mon Sep 17 00:00:00 2001
From: tibbi
Date: Fri, 14 Dec 2018 22:43:06 +0100
Subject: [PATCH 24/99] properly measure scrollview at directories adapter
setup
---
.../simplemobiletools/gallery/pro/activities/MainActivity.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 39d5a7b85..33cc426fe 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -1032,11 +1032,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
if (path != config.tempFolderPath) {
itemClicked(path)
}
- measureRecyclerViewContent(dirsToShow)
}.apply {
setupZoomListener(mZoomListener)
directories_grid.adapter = this
}
+ measureRecyclerViewContent(dirsToShow)
setupScrollDirection()
} else {
if (textToSearch.isNotEmpty()) {
From 5482059235c0e8381070ef1a6d47f7170f678048 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Fri, 14 Dec 2018 22:51:28 +0100
Subject: [PATCH 25/99] open the clicked directory only if it contains no
subfolders, or grouping is disabled
---
.../gallery/pro/activities/MainActivity.kt | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 33cc426fe..651576201 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -1028,9 +1028,12 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
initZoomListener()
val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller
DirectoryAdapter(this, dirsToShow, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) {
- val path = (it as Directory).path
- if (path != config.tempFolderPath) {
- itemClicked(path)
+ val clickedDir = it as Directory
+ if (clickedDir.subfoldersCount == 1 || !config.groupDirectSubfolders) {
+ val path = clickedDir.path
+ if (path != config.tempFolderPath) {
+ itemClicked(path)
+ }
}
}.apply {
setupZoomListener(mZoomListener)
From 98a5b7144b8d24f715a91152e296d7db3783af13 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sat, 15 Dec 2018 21:23:00 +0100
Subject: [PATCH 26/99] fix subfolder counting at "Group direct subfolders"
---
.../gallery/pro/activities/MainActivity.kt | 22 +++++++++++++------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 651576201..3a06fc215 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -967,19 +967,27 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
val newDirs = dirs.filter { foldersToShow.contains(it.path) } as ArrayList
// update the directory media counts, add all subfolder media counts to it
- dirs.forEach {
- val mainDir = it
+ for (dir in dirs) {
var longestSharedPath = ""
- newDirs.forEach {
- if (it.path != mainDir.path && mainDir.path.startsWith(it.path, true) && it.path.length > longestSharedPath.length) {
- it.subfoldersCount += 1
- longestSharedPath = it.path
+ for (newDir in newDirs) {
+ if (newDir.path == dir.path) {
+ longestSharedPath = dir.path
+ continue
}
+
+ if (dir.path.startsWith(newDir.path, true) && newDir.path.length > longestSharedPath.length) {
+ longestSharedPath = newDir.path
+ }
+ }
+
+ val parentFolder = newDirs.firstOrNull { it.path == longestSharedPath }
+ parentFolder?.apply {
+ subfoldersCount++
}
val mainFolder = newDirs.firstOrNull { it.path == longestSharedPath }
if (mainFolder != null) {
- mainFolder.subfoldersMediaCount += mainDir.mediaCnt
+ mainFolder.subfoldersMediaCount += dir.mediaCnt
}
}
From 59c6f911007f3ccdfcbb9a7774f8bba0fedbf2b2 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sat, 15 Dec 2018 21:33:32 +0100
Subject: [PATCH 27/99] move subfolder count updating in an own function
---
.../gallery/pro/activities/MainActivity.kt | 56 +++++++++----------
1 file changed, 27 insertions(+), 29 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 3a06fc215..12dd663d0 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -958,46 +958,44 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
private fun getDirsToShow(dirs: ArrayList): ArrayList {
return if (config.groupDirectSubfolders) {
dirs.forEach {
- it.subfoldersCount = 1
+ it.subfoldersCount = 0
it.subfoldersMediaCount = it.mediaCnt
}
val dirFolders = dirs.map { it.path }.sorted().toMutableSet() as HashSet
val foldersToShow = getDirectParentSubfolders(dirFolders)
- val newDirs = dirs.filter { foldersToShow.contains(it.path) } as ArrayList
-
- // update the directory media counts, add all subfolder media counts to it
- for (dir in dirs) {
- var longestSharedPath = ""
- for (newDir in newDirs) {
- if (newDir.path == dir.path) {
- longestSharedPath = dir.path
- continue
- }
-
- if (dir.path.startsWith(newDir.path, true) && newDir.path.length > longestSharedPath.length) {
- longestSharedPath = newDir.path
- }
- }
-
- val parentFolder = newDirs.firstOrNull { it.path == longestSharedPath }
- parentFolder?.apply {
- subfoldersCount++
- }
-
- val mainFolder = newDirs.firstOrNull { it.path == longestSharedPath }
- if (mainFolder != null) {
- mainFolder.subfoldersMediaCount += dir.mediaCnt
- }
- }
-
- newDirs
+ val parentDirs = dirs.filter { foldersToShow.contains(it.path) } as ArrayList
+ updateSubfolderCounts(dirs, parentDirs)
+ parentDirs
} else {
dirs.forEach { it.subfoldersMediaCount = it.mediaCnt }
dirs
}
}
+ private fun updateSubfolderCounts(children: ArrayList, parentDirs: ArrayList) {
+ for (child in children) {
+ var longestSharedPath = ""
+ for (parentDir in parentDirs) {
+ if (parentDir.path == child.path) {
+ longestSharedPath = child.path
+ continue
+ }
+
+ if (child.path.startsWith(parentDir.path, true) && parentDir.path.length > longestSharedPath.length) {
+ longestSharedPath = parentDir.path
+ }
+ }
+
+ parentDirs.firstOrNull { it.path == longestSharedPath }?.apply {
+ subfoldersCount++
+ if (path != child.path) {
+ subfoldersMediaCount += child.mediaCnt
+ }
+ }
+ }
+ }
+
private fun createDirectoryFromMedia(path: String, curMedia: ArrayList, albumCovers: ArrayList, hiddenString: String,
includedFolders: MutableSet, isSortingAscending: Boolean): Directory {
var thumbnail = curMedia.firstOrNull { getDoesFilePathExist(it.path) }?.path ?: ""
From ce4dee2573a43f368996f1f000d219460769dcbf Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sat, 15 Dec 2018 22:32:11 +0100
Subject: [PATCH 28/99] implement navigation between grouped direct subfolders
---
.../gallery/pro/activities/MainActivity.kt | 20 +++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 12dd663d0..11207297f 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -67,6 +67,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
private var mIsSearchOpen = false
private var mLatestMediaId = 0L
private var mLatestMediaDateId = 0L
+ private var mCurrentPathPrefix = "" // used at "Group direct subfolders" for navigation
private var mLastMediaHandler = Handler()
private var mTempShowHiddenHandler = Handler()
private var mZoomListener: MyRecyclerView.MyZoomListener? = null
@@ -920,8 +921,12 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
val currentPaths = LinkedHashSet()
folders.forEach {
val path = it
- if (path != internalPath && path != sdPath) {
- if (folders.any { it != path && (File(path).parent == it || File(it).parent == File(path).parent) }) {
+ if (!path.equals(internalPath, true) && !path.equals(sdPath, true)) {
+ if (mCurrentPathPrefix.isNotEmpty()) {
+ if (File(path).parent.equals(mCurrentPathPrefix, true) || path == mCurrentPathPrefix) {
+ currentPaths.add(path)
+ }
+ } else if (folders.any { !it.equals(path, true) && (File(path).parent.equals(it, true) || File(it).parent.equals(File(path).parent, true)) }) {
val parent = File(path).parent
currentPaths.add(parent)
} else {
@@ -934,12 +939,16 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
currentPaths.forEach {
val path = it
currentPaths.forEach {
- if (it != path && File(it).parent == path) {
+ if (!it.equals(path) && File(it).parent.equals(path)) {
areDirectSubfoldersAvailable = true
}
}
}
+ if (folders.size == currentPaths.size) {
+ return currentPaths
+ }
+
folders.clear()
folders.addAll(currentPaths)
return if (areDirectSubfoldersAvailable) {
@@ -1035,11 +1044,14 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
val fastscroller = if (config.scrollHorizontally) directories_horizontal_fastscroller else directories_vertical_fastscroller
DirectoryAdapter(this, dirsToShow, this, directories_grid, isPickIntent(intent) || isGetAnyContentIntent(intent), fastscroller) {
val clickedDir = it as Directory
+ val path = clickedDir.path
if (clickedDir.subfoldersCount == 1 || !config.groupDirectSubfolders) {
- val path = clickedDir.path
if (path != config.tempFolderPath) {
itemClicked(path)
}
+ } else {
+ mCurrentPathPrefix = path
+ setupAdapter(mDirs, "")
}
}.apply {
setupZoomListener(mZoomListener)
From 619e7ee3f4727f0cd356ce5c01703f01f57a0757 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sat, 15 Dec 2018 22:40:15 +0100
Subject: [PATCH 29/99] show the current folder as an available option at
grouping too, not just subfolders
---
.../gallery/pro/activities/MainActivity.kt | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 11207297f..326f9954d 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -975,6 +975,16 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
val foldersToShow = getDirectParentSubfolders(dirFolders)
val parentDirs = dirs.filter { foldersToShow.contains(it.path) } as ArrayList
updateSubfolderCounts(dirs, parentDirs)
+
+ // show the current folder as an available option too, not just subfolders
+ if (mCurrentPathPrefix.isNotEmpty()) {
+ val currentFolder = mDirs.firstOrNull { parentDirs.firstOrNull { it.path == mCurrentPathPrefix } == null && it.path == mCurrentPathPrefix }
+ currentFolder?.apply {
+ subfoldersCount = 1
+ parentDirs.add(this)
+ }
+ }
+
parentDirs
} else {
dirs.forEach { it.subfoldersMediaCount = it.mediaCnt }
From a96e3201a3b847d187595e43bb2eff03acf02f94 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sat, 15 Dec 2018 23:51:27 +0100
Subject: [PATCH 30/99] add an extra check for handling only direct subfolders
---
.../gallery/pro/activities/MainActivity.kt | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 326f9954d..778c07f3e 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -1006,10 +1006,13 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
}
+ // make sure we count only the proper direct subfolders, grouped the same way as on the main screen
parentDirs.firstOrNull { it.path == longestSharedPath }?.apply {
- subfoldersCount++
- if (path != child.path) {
- subfoldersMediaCount += child.mediaCnt
+ if (path.equals(child.path, true) || path.equals(File(child.path).parent, true) || children.any { it.path.equals(File(child.path).parent, true) }) {
+ subfoldersCount++
+ if (path != child.path) {
+ subfoldersMediaCount += child.mediaCnt
+ }
}
}
}
From adf02739fe18719997ae779d31b3b284d79cc4cf Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 10:19:10 +0100
Subject: [PATCH 31/99] implement Back navigation at direct subfolder grouping
---
.../gallery/pro/activities/MainActivity.kt | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 778c07f3e..5fd3f08be 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -67,7 +67,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
private var mIsSearchOpen = false
private var mLatestMediaId = 0L
private var mLatestMediaDateId = 0L
- private var mCurrentPathPrefix = "" // used at "Group direct subfolders" for navigation
+ private var mCurrentPathPrefix = "" // used at "Group direct subfolders" for navigation
+ private var mOpenedSubfolders = arrayListOf("") // used at "Group direct subfolders" for navigating Up with the back button
private var mLastMediaHandler = Handler()
private var mTempShowHiddenHandler = Handler()
private var mZoomListener: MyRecyclerView.MyZoomListener? = null
@@ -243,6 +244,20 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
}
+ override fun onBackPressed() {
+ if (config.groupDirectSubfolders) {
+ if (mCurrentPathPrefix.isEmpty()) {
+ super.onBackPressed()
+ } else {
+ mOpenedSubfolders.removeAt(mOpenedSubfolders.size - 1)
+ mCurrentPathPrefix = mOpenedSubfolders.last()
+ setupAdapter(mDirs)
+ }
+ } else {
+ super.onBackPressed()
+ }
+ }
+
override fun onCreateOptionsMenu(menu: Menu): Boolean {
if (mIsThirdPartyIntent) {
menuInflater.inflate(R.menu.menu_main_intent, menu)
@@ -1064,6 +1079,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
} else {
mCurrentPathPrefix = path
+ mOpenedSubfolders.add(path)
setupAdapter(mDirs, "")
}
}.apply {
From ea20c282ab9a28c299e799d37e05a8373b4ea8c6 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 10:23:17 +0100
Subject: [PATCH 32/99] avoid redundant folders adapter refreshing at direct
subfolder groupind
---
.../simplemobiletools/gallery/pro/activities/MainActivity.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 5fd3f08be..3af4e7043 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -821,7 +821,7 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
}
// we are looping through the already displayed folders looking for changes, do not do anything if nothing changed
- if (directory == newDir) {
+ if (directory.copy(subfoldersCount = 0, subfoldersMediaCount = 0) == newDir) {
continue
}
From 1bc7616821e57a2e9df48013f42ae187b8b95c6e Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 10:44:18 +0100
Subject: [PATCH 33/99] fix #1122, show full filename at delete confirmation,
if deleting 1 item
---
.../gallery/pro/activities/ViewPagerActivity.kt | 12 ++++++++++--
.../gallery/pro/adapters/DirectoryAdapter.kt | 7 ++++++-
.../gallery/pro/adapters/MediaAdapter.kt | 11 +++++++++--
3 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt
index 55dc39a86..8ff340ec4 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/ViewPagerActivity.kt
@@ -936,8 +936,16 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
}
private fun askConfirmDelete() {
- val message = if (config.useRecycleBin && !getCurrentMedium()!!.getIsInRecycleBin()) R.string.are_you_sure_recycle_bin else R.string.are_you_sure_delete
- DeleteWithRememberDialog(this, getString(message)) {
+ val filename = "\"${getCurrentPath().getFilenameFromPath()}\""
+
+ val baseString = if (config.useRecycleBin && !getCurrentMedium()!!.getIsInRecycleBin()) {
+ R.string.move_to_recycle_bin_confirmation
+ } else {
+ R.string.deletion_confirmation
+ }
+
+ val message = String.format(resources.getString(baseString), filename)
+ DeleteWithRememberDialog(this, message) {
config.tempSkipDeleteConfirmation = it
deleteConfirmed()
}
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 bab6956e0..80ec519f3 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
@@ -372,7 +372,12 @@ class DirectoryAdapter(activity: BaseSimpleActivity, var dirs: ArrayList deleteFolders()
else -> {
val itemsCnt = selectedKeys.size
- val items = resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt)
+ val items = if (itemsCnt == 1) {
+ "\"${getSelectedPaths().first().getFilenameFromPath()}\""
+ } else {
+ resources.getQuantityString(R.plurals.delete_items, itemsCnt, itemsCnt)
+ }
+
val fileDirItem = getFirstSelectedItem() ?: return
val baseString = if (!config.useRecycleBin || (isOneItemSelected() && fileDirItem.isRecycleBin()) || (isOneItemSelected() && fileDirItem.areFavorites())) {
R.string.deletion_confirmation
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt
index 8731f0a30..e20ea1351 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/adapters/MediaAdapter.kt
@@ -372,8 +372,15 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList
Date: Sun, 16 Dec 2018 13:13:41 +0100
Subject: [PATCH 34/99] creating a Widget table
---
.../gallery/pro/databases/GalleryDatabase.kt | 14 +++++++++++++-
.../gallery/pro/interfaces/WidgetsDao.kt | 19 +++++++++++++++++++
.../gallery/pro/models/Widget.kt | 12 ++++++++++++
3 files changed, 44 insertions(+), 1 deletion(-)
create mode 100644 app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/WidgetsDao.kt
create mode 100644 app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Widget.kt
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt
index d6412cda5..7f0257f9b 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/databases/GalleryDatabase.kt
@@ -8,16 +8,20 @@ import androidx.room.migration.Migration
import androidx.sqlite.db.SupportSQLiteDatabase
import com.simplemobiletools.gallery.pro.interfaces.DirectoryDao
import com.simplemobiletools.gallery.pro.interfaces.MediumDao
+import com.simplemobiletools.gallery.pro.interfaces.WidgetsDao
import com.simplemobiletools.gallery.pro.models.Directory
import com.simplemobiletools.gallery.pro.models.Medium
+import com.simplemobiletools.gallery.pro.models.Widget
-@Database(entities = [Directory::class, Medium::class], version = 5)
+@Database(entities = [Directory::class, Medium::class, Widget::class], version = 6)
abstract class GalleryDatabase : RoomDatabase() {
abstract fun DirectoryDao(): DirectoryDao
abstract fun MediumDao(): MediumDao
+ abstract fun WidgetsDao(): WidgetsDao
+
companion object {
private var db: GalleryDatabase? = null
@@ -27,6 +31,7 @@ abstract class GalleryDatabase : RoomDatabase() {
if (db == null) {
db = Room.databaseBuilder(context.applicationContext, GalleryDatabase::class.java, "gallery.db")
.addMigrations(MIGRATION_4_5)
+ .addMigrations(MIGRATION_5_6)
.build()
}
}
@@ -43,5 +48,12 @@ abstract class GalleryDatabase : RoomDatabase() {
database.execSQL("ALTER TABLE media ADD COLUMN video_duration INTEGER default 0 NOT NULL")
}
}
+
+ private val MIGRATION_5_6 = object : Migration(5, 6) {
+ override fun migrate(database: SupportSQLiteDatabase) {
+ database.execSQL("CREATE TABLE IF NOT EXISTS `widgets` (`id` INTEGER PRIMARY KEY AUTOINCREMENT, `widget_id` INTEGER NOT NULL, `folder_path` TEXT NOT NULL)")
+ database.execSQL("CREATE UNIQUE INDEX `index_widgets_widget_id` ON `widgets` (`widget_id`)")
+ }
+ }
}
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/WidgetsDao.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/WidgetsDao.kt
new file mode 100644
index 000000000..72409ca35
--- /dev/null
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/WidgetsDao.kt
@@ -0,0 +1,19 @@
+package com.simplemobiletools.gallery.pro.interfaces
+
+import androidx.room.Dao
+import androidx.room.Insert
+import androidx.room.OnConflictStrategy
+import androidx.room.Query
+import com.simplemobiletools.gallery.pro.models.Widget
+
+@Dao
+interface WidgetsDao {
+ @Query("SELECT * FROM widgets")
+ fun getWidgets(): List
+
+ @Insert(onConflict = OnConflictStrategy.REPLACE)
+ fun insertOrUpdate(widget: Widget): Long
+
+ @Query("DELETE FROM widgets WHERE folder_path = :folderPath")
+ fun deleteNoteWidgets(folderPath: String)
+}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Widget.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Widget.kt
new file mode 100644
index 000000000..2ef525334
--- /dev/null
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/models/Widget.kt
@@ -0,0 +1,12 @@
+package com.simplemobiletools.gallery.pro.models
+
+import androidx.room.ColumnInfo
+import androidx.room.Entity
+import androidx.room.Index
+import androidx.room.PrimaryKey
+
+@Entity(tableName = "widgets", indices = [(Index(value = ["widget_id"], unique = true))])
+data class Widget(
+ @PrimaryKey(autoGenerate = true) var id: Int?,
+ @ColumnInfo(name = "widget_id") var widgetId: Int,
+ @ColumnInfo(name = "folder_path") var folderPath: String)
From 69b77a296a51680a0be9b3c76030c3e58c71bef3 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 15:48:44 +0100
Subject: [PATCH 35/99] adding an initial widget implementation
---
app/src/main/AndroidManifest.xml | 21 ++++
.../gallery/pro/activities/MediaActivity.kt | 3 +-
.../pro/activities/WidgetConfigureActivity.kt | 112 ++++++++++++++++++
.../gallery/pro/extensions/Context.kt | 3 +
.../gallery/pro/helpers/MyWidgetProvider.kt | 37 ++++++
app/src/main/res/layout/widget.xml | 14 +++
app/src/main/res/layout/widget_config.xml | 62 ++++++++++
app/src/main/res/xml/widget_info.xml | 10 ++
8 files changed, 260 insertions(+), 2 deletions(-)
create mode 100644 app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
create mode 100644 app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
create mode 100644 app/src/main/res/layout/widget.xml
create mode 100644 app/src/main/res/layout/widget_config.xml
create mode 100644 app/src/main/res/xml/widget_info.xml
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index a33b0c153..883b24d4c 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -215,6 +215,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if (wasPositivePressed) {
+ mBgColorWithoutTransparency = color
+ updateBackgroundColor()
+ }
+ }
+ }
+}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt
index d7430f161..2e7cdb0a3 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt
@@ -25,6 +25,7 @@ import com.simplemobiletools.gallery.pro.databases.GalleryDatabase
import com.simplemobiletools.gallery.pro.helpers.*
import com.simplemobiletools.gallery.pro.interfaces.DirectoryDao
import com.simplemobiletools.gallery.pro.interfaces.MediumDao
+import com.simplemobiletools.gallery.pro.interfaces.WidgetsDao
import com.simplemobiletools.gallery.pro.models.Directory
import com.simplemobiletools.gallery.pro.models.Medium
import com.simplemobiletools.gallery.pro.models.ThumbnailItem
@@ -104,6 +105,8 @@ val Context.config: Config get() = Config.newInstance(applicationContext)
val Context.galleryDB: GalleryDatabase get() = GalleryDatabase.getInstance(applicationContext)
+val Context.widgetsDB: WidgetsDao get() = GalleryDatabase.getInstance(applicationContext).WidgetsDao()
+
val Context.recycleBin: File get() = filesDir
val Context.recycleBinPath: String get() = filesDir.absolutePath
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
new file mode 100644
index 000000000..08ef3081c
--- /dev/null
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
@@ -0,0 +1,37 @@
+package com.simplemobiletools.gallery.pro.helpers
+
+import android.app.PendingIntent
+import android.appwidget.AppWidgetManager
+import android.appwidget.AppWidgetProvider
+import android.content.Context
+import android.content.Intent
+import android.widget.RemoteViews
+import com.simplemobiletools.commons.extensions.setBackgroundColor
+import com.simplemobiletools.gallery.pro.R
+import com.simplemobiletools.gallery.pro.activities.MediaActivity
+import com.simplemobiletools.gallery.pro.extensions.config
+import com.simplemobiletools.gallery.pro.extensions.widgetsDB
+import com.simplemobiletools.gallery.pro.models.Widget
+
+class MyWidgetProvider : AppWidgetProvider() {
+ private fun setupAppOpenIntent(context: Context, views: RemoteViews, id: Int, widget: Widget) {
+ val intent = Intent(context, MediaActivity::class.java).apply {
+ putExtra(DIRECTORY, widget.folderPath)
+ }
+
+ val pendingIntent = PendingIntent.getActivity(context, widget.widgetId, intent, PendingIntent.FLAG_UPDATE_CURRENT)
+ views.setOnClickPendingIntent(id, pendingIntent)
+ }
+
+ override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) {
+ super.onUpdate(context, appWidgetManager, appWidgetIds)
+ Thread {
+ context.widgetsDB.getWidgets().forEach {
+ val views = RemoteViews(context.packageName, R.layout.widget)
+ views.setBackgroundColor(R.id.widget_holder, context.config.widgetBgColor)
+ setupAppOpenIntent(context, views, R.id.widget_holder, it)
+ appWidgetManager.updateAppWidget(it.widgetId, views)
+ }
+ }.start()
+ }
+}
diff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml
new file mode 100644
index 000000000..2be9e64d5
--- /dev/null
+++ b/app/src/main/res/layout/widget.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
diff --git a/app/src/main/res/layout/widget_config.xml b/app/src/main/res/layout/widget_config.xml
new file mode 100644
index 000000000..1b36ee583
--- /dev/null
+++ b/app/src/main/res/layout/widget_config.xml
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/xml/widget_info.xml b/app/src/main/res/xml/widget_info.xml
new file mode 100644
index 000000000..ecfa6d765
--- /dev/null
+++ b/app/src/main/res/xml/widget_info.xml
@@ -0,0 +1,10 @@
+
+
From bd22244a8533834d79f548bdcae70dc2cdb7030e Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 16:04:29 +0100
Subject: [PATCH 36/99] set the widget config Save text color to the primary
color
---
.../gallery/pro/activities/WidgetConfigureActivity.kt | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index 4e6daeeb0..af157de34 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -7,10 +7,7 @@ import android.graphics.Color
import android.os.Bundle
import android.widget.RemoteViews
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
-import com.simplemobiletools.commons.extensions.adjustAlpha
-import com.simplemobiletools.commons.extensions.onSeekBarChangeListener
-import com.simplemobiletools.commons.extensions.setBackgroundColor
-import com.simplemobiletools.commons.extensions.setFillWithStroke
+import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.pro.extensions.widgetsDB
@@ -39,6 +36,7 @@ class WidgetConfigureActivity : SimpleActivity() {
config_save.setOnClickListener { saveConfig() }
config_bg_color.setOnClickListener { pickBackgroundColor() }
+ config_save.setTextColor(getAdjustedPrimaryColor())
}
private fun initVariables() {
From 233b6e3b54bb72cd884a6efa342a020ce3e2820e Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 16:24:44 +0100
Subject: [PATCH 37/99] adding a folder picker to the widget config screen
---
.../pro/activities/WidgetConfigureActivity.kt | 3 +++
app/src/main/res/layout/widget_config.xml | 25 +++++++++++++++++++
app/src/main/res/values-ar/strings.xml | 3 +++
app/src/main/res/values-az/strings.xml | 3 +++
app/src/main/res/values-ca/strings.xml | 3 +++
app/src/main/res/values-cs/strings.xml | 3 +++
app/src/main/res/values-da/strings.xml | 3 +++
app/src/main/res/values-de/strings.xml | 3 +++
app/src/main/res/values-el/strings.xml | 3 +++
app/src/main/res/values-es/strings.xml | 3 +++
app/src/main/res/values-fi/strings.xml | 3 +++
app/src/main/res/values-fr/strings.xml | 3 +++
app/src/main/res/values-gl/strings.xml | 3 +++
app/src/main/res/values-hr/strings.xml | 3 +++
app/src/main/res/values-hu/strings.xml | 3 +++
app/src/main/res/values-id/strings.xml | 3 +++
app/src/main/res/values-it/strings.xml | 3 +++
app/src/main/res/values-ja/strings.xml | 3 +++
app/src/main/res/values-ko-rKR/strings.xml | 3 +++
app/src/main/res/values-lt/strings.xml | 3 +++
app/src/main/res/values-nb/strings.xml | 3 +++
app/src/main/res/values-nl/strings.xml | 3 +++
app/src/main/res/values-pl/strings.xml | 3 +++
app/src/main/res/values-pt-rBR/strings.xml | 3 +++
app/src/main/res/values-pt/strings.xml | 3 +++
app/src/main/res/values-ru/strings.xml | 3 +++
app/src/main/res/values-sk/strings.xml | 3 +++
app/src/main/res/values-sl/strings.xml | 3 +++
app/src/main/res/values-sv/strings.xml | 3 +++
app/src/main/res/values-tr/strings.xml | 3 +++
app/src/main/res/values-uk/strings.xml | 3 +++
app/src/main/res/values-zh-rCN/strings.xml | 3 +++
app/src/main/res/values-zh-rTW/strings.xml | 3 +++
app/src/main/res/values/strings.xml | 3 +++
34 files changed, 124 insertions(+)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index af157de34..dea54cf27 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -4,6 +4,7 @@ import android.app.Activity
import android.appwidget.AppWidgetManager
import android.content.Intent
import android.graphics.Color
+import android.graphics.drawable.ColorDrawable
import android.os.Bundle
import android.widget.RemoteViews
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
@@ -37,6 +38,8 @@ class WidgetConfigureActivity : SimpleActivity() {
config_save.setOnClickListener { saveConfig() }
config_bg_color.setOnClickListener { pickBackgroundColor() }
config_save.setTextColor(getAdjustedPrimaryColor())
+ updateTextColors(folder_picker_holder)
+ folder_picker_holder.background = ColorDrawable(config.backgroundColor)
}
private fun initVariables() {
diff --git a/app/src/main/res/layout/widget_config.xml b/app/src/main/res/layout/widget_config.xml
index 1b36ee583..2c22b4e2c 100644
--- a/app/src/main/res/layout/widget_config.xml
+++ b/app/src/main/res/layout/widget_config.xml
@@ -7,10 +7,35 @@
android:layout_centerHorizontal="true"
android:layout_margin="@dimen/activity_margin">
+
+
+
+
+
+
+
+
File type
Extension
+
+ Folder shown on the widget:
+
تشغيل الفديوهات تلقائيا
Remember last video playback position
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index 9bf9ff4b5..0735b5932 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -132,6 +132,9 @@
File type
Extension
+
+ Folder shown on the widget:
+
Play videos automatically
Remember last video playback position
diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml
index c639078f1..faedd7c3a 100644
--- a/app/src/main/res/values-ca/strings.xml
+++ b/app/src/main/res/values-ca/strings.xml
@@ -132,6 +132,9 @@
Tipus de fitxer
Extensió
+
+ Folder shown on the widget:
+
Reproduir vídeos automàticament
Recordeu la posició de la darrera reproducció de vídeo
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index 291bda22e..4c89cc9e1 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -132,6 +132,9 @@
Typu souboru
Přípony
+
+ Folder shown on the widget:
+
Automaticky přehrávat videa
Zapamatovat pozici posledního přehraného videa
diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml
index a2f85f704..13f5116a5 100644
--- a/app/src/main/res/values-da/strings.xml
+++ b/app/src/main/res/values-da/strings.xml
@@ -132,6 +132,9 @@
File type
Extension
+
+ Folder shown on the widget:
+
Afspil automatisk videoer
Remember last video playback position
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 1e8d4ddbd..899498d63 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -132,6 +132,9 @@
Dateityp (Bilder/Videos)
Dateierweiterung
+
+ Folder shown on the widget:
+
Videos automatisch abspielen
Letzte Videowiedergabeposition erinnern
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index 0226ad203..f40f40588 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -132,6 +132,9 @@
Τύπο αρχείου
Επέκταση
+
+ Folder shown on the widget:
+
Αυτόματη αναπαραγωγή βίντεο
Απομνημόνευση της τελευταίας θέσης αναπαραγωγής βίντεο
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index 7d65f1ac2..b2b3fc787 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -132,6 +132,9 @@
Tipo de fichero
Extensión
+
+ Folder shown on the widget:
+
Reproducir vídeos automáticamente
Recuerde la última posición de reproducción de video
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index e26cef2a7..45692fb47 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -132,6 +132,9 @@
File type
Extension
+
+ Folder shown on the widget:
+
Toista videot automaattisesti
Remember last video playback position
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index c2c905a9f..ae51914a6 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -132,6 +132,9 @@
Type de fichier
Extension
+
+ Folder shown on the widget:
+
Lecture automatique des vidéos
Remember last video playback position
diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml
index 07e7df693..301428866 100644
--- a/app/src/main/res/values-gl/strings.xml
+++ b/app/src/main/res/values-gl/strings.xml
@@ -132,6 +132,9 @@
Tipo de ficheior
Extensión
+
+ Folder shown on the widget:
+
Reproducir vídeos automticamente
Remember last video playback position
diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml
index 6090e559b..2189a198c 100644
--- a/app/src/main/res/values-hr/strings.xml
+++ b/app/src/main/res/values-hr/strings.xml
@@ -132,6 +132,9 @@
Tip datoteke
Vrsta datoteke
+
+ Folder shown on the widget:
+
Automatsko pokretanje videa
Remember last video playback position
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 65468b93e..5d21de866 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -133,6 +133,9 @@
Fájl típus
Kiterjesztés
+
+ Folder shown on the widget:
+
Automatikus videó lejátszás
Emlékezzen a videó utolsó lejátszási pozícióra
diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml
index 6bc47a212..cbcce0246 100644
--- a/app/src/main/res/values-id/strings.xml
+++ b/app/src/main/res/values-id/strings.xml
@@ -132,6 +132,9 @@
Jenis file
Ekstensi
+
+ Folder shown on the widget:
+
Putar video otomatis
Ingat posisi pemutaran terakhir
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 95b22925f..467db5d4c 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -132,6 +132,9 @@
Tipo di file
Estensione
+
+ Folder shown on the widget:
+
Riproduci i video automaticamente
Ricorda l\'ultimo stato di riproduzione dei video
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index d1a8bc92e..d728d7c25 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -132,6 +132,9 @@
ファイル形式
拡張子
+
+ Folder shown on the widget:
+
ビデオを自動再生
Remember last video playback position
diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml
index 974054786..2ab9b6ef7 100644
--- a/app/src/main/res/values-ko-rKR/strings.xml
+++ b/app/src/main/res/values-ko-rKR/strings.xml
@@ -132,6 +132,9 @@
File type
Extension
+
+ Folder shown on the widget:
+
비디오 자동재생
Remember last video playback position
diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml
index f0f73e1a1..2e9d2c20a 100644
--- a/app/src/main/res/values-lt/strings.xml
+++ b/app/src/main/res/values-lt/strings.xml
@@ -132,6 +132,9 @@
File type
Extension
+
+ Folder shown on the widget:
+
Groti vaizdo įrašus automatiškai
Remember last video playback position
diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml
index a866ca6e4..d3837c681 100644
--- a/app/src/main/res/values-nb/strings.xml
+++ b/app/src/main/res/values-nb/strings.xml
@@ -132,6 +132,9 @@
Filtype
Endelse
+
+ Folder shown on the widget:
+
Avspill videoer automatisk
Husk siste videoavspillingsposisjon
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 175650e03..3e49c2d21 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -132,6 +132,9 @@
Bestandstype
Extensie
+
+ Folder shown on the widget:
+
Video\'s automatisch afspelen
Laatste positie in video\'s onthouden
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index 991c22e7b..f0d171f35 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -132,6 +132,9 @@
Typu
Rozszerzenia
+
+ Folder shown on the widget:
+
Odtwarzaj filmy automatycznie
Pamiętaj ostatni moment odtwarzania filmów
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 027f9a086..71ce1c7fa 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -132,6 +132,9 @@
File type
Extension
+
+ Folder shown on the widget:
+
Reproduzir vídeos automaticamente
Remember last video playback position
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 96c217a29..6c95bdbe9 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -132,6 +132,9 @@
Tipo de ficheiro
Extensão
+
+ Folder shown on the widget:
+
Reproduzir vídeos automaticamente
Memorizar posição da reprodução
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index ed4adfa28..ce0b4eca0 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -132,6 +132,9 @@
Тип файла
Расширение
+
+ Folder shown on the widget:
+
Воспроизводить видео автоматически
Запоминать позицию воспроизведения видео
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index a081eb7a5..255f819ed 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -132,6 +132,9 @@
Typu súboru
Prípony
+
+ Priečinok zobrazený vo widgete:
+
Spúšťať videá automaticky
Zapamätať si pozíciu posledného prehraného videa
diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml
index 3dfff7213..df296d51e 100644
--- a/app/src/main/res/values-sl/strings.xml
+++ b/app/src/main/res/values-sl/strings.xml
@@ -132,6 +132,9 @@
Tip datoteke
Končnica
+
+ Folder shown on the widget:
+
Avtomatično predvajaj videoposnetke
Zapomni si zadnji položaj predvajanja
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 04dd09abc..81d51588d 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -132,6 +132,9 @@
Filtyp
Filnamnstillägg
+
+ Folder shown on the widget:
+
Spela upp videor automatiskt
Remember last video playback position
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index cabbb3093..efd1df962 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -132,6 +132,9 @@
Dosya türü
Uzantı
+
+ Folder shown on the widget:
+
Videoları otomatik oynat
Son video oynatma konumunu hatırla
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index a593e2671..e73252288 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -132,6 +132,9 @@
типом файлу
розширенням
+
+ Folder shown on the widget:
+
Відтворювати відео автоматично
Запам\'ятовувати місце зупинки перегляду
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 9f2d35ee9..30d9d0ab0 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -132,6 +132,9 @@
文件类型
扩展
+
+ Folder shown on the widget:
+
自动播放
记住上次视频播放位置
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index f8e08f4f7..ee13dfe07 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -132,6 +132,9 @@
檔案類型
副檔名
+
+ Folder shown on the widget:
+
自動播放影片
記住影片上次撥放位置
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index c66b10185..7df94fa7e 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -132,6 +132,9 @@
File type
Extension
+
+ Folder shown on the widget:
+
Play videos automatically
Remember last video playback position
From ba4b120dfe1b518833ddd083e59a7c303513bd50 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 16:36:18 +0100
Subject: [PATCH 38/99] load the first folders image at the widget config
screen
---
.../gallery/pro/activities/WidgetConfigureActivity.kt | 11 +++++++++++
app/src/main/res/layout/widget_config.xml | 5 ++---
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index dea54cf27..899f59629 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -11,6 +11,8 @@ import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.pro.extensions.config
+import com.simplemobiletools.gallery.pro.extensions.getCachedDirectories
+import com.simplemobiletools.gallery.pro.extensions.loadJpg
import com.simplemobiletools.gallery.pro.extensions.widgetsDB
import com.simplemobiletools.gallery.pro.helpers.MyWidgetProvider
import com.simplemobiletools.gallery.pro.models.Widget
@@ -40,6 +42,15 @@ class WidgetConfigureActivity : SimpleActivity() {
config_save.setTextColor(getAdjustedPrimaryColor())
updateTextColors(folder_picker_holder)
folder_picker_holder.background = ColorDrawable(config.backgroundColor)
+
+ getCachedDirectories(false, false) {
+ val path = it.firstOrNull()?.tmb
+ if (path != null) {
+ runOnUiThread {
+ loadJpg(path, config_image, true)
+ }
+ }
+ }
}
private fun initVariables() {
diff --git a/app/src/main/res/layout/widget_config.xml b/app/src/main/res/layout/widget_config.xml
index 2c22b4e2c..d8b56d5d1 100644
--- a/app/src/main/res/layout/widget_config.xml
+++ b/app/src/main/res/layout/widget_config.xml
@@ -35,10 +35,9 @@
android:id="@+id/config_image_holder"
android:layout_width="110dp"
android:layout_height="110dp"
- android:layout_below="@+id/folder_picker_holder"
- android:padding="@dimen/activity_margin">
+ android:layout_below="@+id/folder_picker_holder">
-
From abb0a69f7a32935f53a9f68742695f7438a21d01 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 16:50:10 +0100
Subject: [PATCH 39/99] add handling for widget folder picking
---
.../pro/activities/WidgetConfigureActivity.kt | 29 ++++++++++++++++---
1 file changed, 25 insertions(+), 4 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index 899f59629..22c10231d 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -10,11 +10,13 @@ import android.widget.RemoteViews
import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.gallery.pro.R
+import com.simplemobiletools.gallery.pro.dialogs.PickDirectoryDialog
import com.simplemobiletools.gallery.pro.extensions.config
import com.simplemobiletools.gallery.pro.extensions.getCachedDirectories
import com.simplemobiletools.gallery.pro.extensions.loadJpg
import com.simplemobiletools.gallery.pro.extensions.widgetsDB
import com.simplemobiletools.gallery.pro.helpers.MyWidgetProvider
+import com.simplemobiletools.gallery.pro.models.Directory
import com.simplemobiletools.gallery.pro.models.Widget
import kotlinx.android.synthetic.main.widget_config.*
@@ -23,6 +25,8 @@ class WidgetConfigureActivity : SimpleActivity() {
private var mWidgetId = 0
private var mBgColor = 0
private var mBgColorWithoutTransparency = 0
+ private var mFolderPath = ""
+ private var mDirectories = ArrayList()
public override fun onCreate(savedInstanceState: Bundle?) {
useDynamicTheme = false
@@ -39,16 +43,17 @@ class WidgetConfigureActivity : SimpleActivity() {
config_save.setOnClickListener { saveConfig() }
config_bg_color.setOnClickListener { pickBackgroundColor() }
+ folder_picker_value.setOnClickListener { changeSelectedFolder() }
+ config_image_holder.setOnClickListener { changeSelectedFolder() }
config_save.setTextColor(getAdjustedPrimaryColor())
updateTextColors(folder_picker_holder)
folder_picker_holder.background = ColorDrawable(config.backgroundColor)
getCachedDirectories(false, false) {
- val path = it.firstOrNull()?.tmb
+ mDirectories = it
+ val path = it.firstOrNull()?.path
if (path != null) {
- runOnUiThread {
- loadJpg(path, config_image, true)
- }
+ updateFolderImage(path)
}
}
}
@@ -121,4 +126,20 @@ class WidgetConfigureActivity : SimpleActivity() {
}
}
}
+
+ private fun changeSelectedFolder() {
+ PickDirectoryDialog(this, mFolderPath) {
+ updateFolderImage(it)
+ }
+ }
+
+ private fun updateFolderImage(folderPath: String) {
+ mFolderPath = folderPath
+ val tmb = mDirectories.firstOrNull { it.path == folderPath }?.tmb
+ if (tmb != null) {
+ runOnUiThread {
+ loadJpg(tmb, config_image, true)
+ }
+ }
+ }
}
From 5f10bebb19417cb136351d6d1a6c82b97ebdc6e6 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 16:54:56 +0100
Subject: [PATCH 40/99] hide the Other Folder button at the widget folder
picker
---
.../pro/activities/WidgetConfigureActivity.kt | 2 +-
.../pro/dialogs/PickDirectoryDialog.kt | 30 +++++++++++--------
.../gallery/pro/dialogs/PickMediumDialog.kt | 2 +-
.../gallery/pro/extensions/Activity.kt | 2 +-
4 files changed, 20 insertions(+), 16 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index 22c10231d..9b3a26bf7 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -128,7 +128,7 @@ class WidgetConfigureActivity : SimpleActivity() {
}
private fun changeSelectedFolder() {
- PickDirectoryDialog(this, mFolderPath) {
+ PickDirectoryDialog(this, mFolderPath, false) {
updateFolderImage(it)
}
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt
index 3bf2aa3d4..3acdf41a5 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt
@@ -16,7 +16,7 @@ import com.simplemobiletools.gallery.pro.helpers.VIEW_TYPE_GRID
import com.simplemobiletools.gallery.pro.models.Directory
import kotlinx.android.synthetic.main.dialog_directory_picker.view.*
-class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: String, val callback: (path: String) -> Unit) {
+class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: String, val showOtherFolderButton: Boolean, val callback: (path: String) -> Unit) {
var dialog: AlertDialog
var shownDirectories = ArrayList()
var view = activity.layoutInflater.inflate(R.layout.dialog_directory_picker, null)
@@ -29,22 +29,26 @@ class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: Stri
spanCount = if (isGridViewType) activity.config.dirColumnCnt else 1
}
- dialog = AlertDialog.Builder(activity)
+ val builder = AlertDialog.Builder(activity)
.setPositiveButton(R.string.ok, null)
.setNegativeButton(R.string.cancel, null)
- .setNeutralButton(R.string.other_folder) { dialogInterface, i -> showOtherFolder() }
- .create().apply {
- activity.setupDialogStuff(view, this, R.string.select_destination) {
- view.directories_show_hidden.beVisibleIf(!context.config.shouldShowHidden)
- view.directories_show_hidden.setOnClickListener {
- activity.handleHiddenFolderPasswordProtection {
- view.directories_show_hidden.beGone()
- showHidden = true
- fetchDirectories(true)
- }
- }
+
+ if (showOtherFolderButton) {
+ builder.setNeutralButton(R.string.other_folder) { dialogInterface, i -> showOtherFolder() }
+ }
+
+ dialog = builder.create().apply {
+ activity.setupDialogStuff(view, this, R.string.select_destination) {
+ view.directories_show_hidden.beVisibleIf(!context.config.shouldShowHidden)
+ view.directories_show_hidden.setOnClickListener {
+ activity.handleHiddenFolderPasswordProtection {
+ view.directories_show_hidden.beGone()
+ showHidden = true
+ fetchDirectories(true)
}
}
+ }
+ }
fetchDirectories(false)
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickMediumDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickMediumDialog.kt
index ae5675356..b1f83527b 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickMediumDialog.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickMediumDialog.kt
@@ -53,7 +53,7 @@ class PickMediumDialog(val activity: BaseSimpleActivity, val path: String, val c
}
private fun showOtherFolder() {
- PickDirectoryDialog(activity, path) {
+ PickDirectoryDialog(activity, path, true) {
callback(it)
dialog.dismiss()
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt
index 21cf823ce..3c742da68 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Activity.kt
@@ -183,7 +183,7 @@ fun BaseSimpleActivity.tryCopyMoveFilesTo(fileDirItems: ArrayList,
}
val source = fileDirItems[0].getParentPath()
- PickDirectoryDialog(this, source) {
+ PickDirectoryDialog(this, source, true) {
copyMoveFilesTo(fileDirItems, source.trimEnd('/'), it, isCopyOperation, true, config.shouldShowHidden, callback)
}
}
From 69f6599f8df817491626fb7a7d9ed475204c7d21 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 16:57:05 +0100
Subject: [PATCH 41/99] show proper media counts at the Pick Directory dialog
---
.../gallery/pro/dialogs/PickDirectoryDialog.kt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt
index 3acdf41a5..d8d67fc10 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/dialogs/PickDirectoryDialog.kt
@@ -16,7 +16,7 @@ import com.simplemobiletools.gallery.pro.helpers.VIEW_TYPE_GRID
import com.simplemobiletools.gallery.pro.models.Directory
import kotlinx.android.synthetic.main.dialog_directory_picker.view.*
-class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: String, val showOtherFolderButton: Boolean, val callback: (path: String) -> Unit) {
+class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: String, showOtherFolderButton: Boolean, val callback: (path: String) -> Unit) {
var dialog: AlertDialog
var shownDirectories = ArrayList()
var view = activity.layoutInflater.inflate(R.layout.dialog_directory_picker, null)
@@ -56,6 +56,10 @@ class PickDirectoryDialog(val activity: BaseSimpleActivity, val sourcePath: Stri
private fun fetchDirectories(forceShowHidden: Boolean) {
activity.getCachedDirectories(forceShowHidden = forceShowHidden) {
if (it.isNotEmpty()) {
+ it.forEach {
+ it.subfoldersMediaCount = it.mediaCnt
+ }
+
activity.runOnUiThread {
gotDirectories(activity.addTempFolderIfNeeded(it))
}
From a7f2cc61c8dd10b3ff0d52a48bbdbe287beed3eb Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 17:13:17 +0100
Subject: [PATCH 42/99] store the folder path at widgets, not thumbnail path
---
.../pro/activities/WidgetConfigureActivity.kt | 19 +++++++++----------
.../gallery/pro/extensions/Context.kt | 2 ++
.../gallery/pro/interfaces/DirectoryDao.kt | 3 +++
3 files changed, 14 insertions(+), 10 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index 9b3a26bf7..a656c01ec 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -11,10 +11,7 @@ import com.simplemobiletools.commons.dialogs.ColorPickerDialog
import com.simplemobiletools.commons.extensions.*
import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.pro.dialogs.PickDirectoryDialog
-import com.simplemobiletools.gallery.pro.extensions.config
-import com.simplemobiletools.gallery.pro.extensions.getCachedDirectories
-import com.simplemobiletools.gallery.pro.extensions.loadJpg
-import com.simplemobiletools.gallery.pro.extensions.widgetsDB
+import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.pro.helpers.MyWidgetProvider
import com.simplemobiletools.gallery.pro.models.Directory
import com.simplemobiletools.gallery.pro.models.Widget
@@ -83,7 +80,7 @@ class WidgetConfigureActivity : SimpleActivity() {
val views = RemoteViews(packageName, R.layout.widget)
views.setBackgroundColor(R.id.widget_holder, mBgColor)
AppWidgetManager.getInstance(this).updateAppWidget(mWidgetId, views)
- val widget = Widget(null, mWidgetId, "/storage/emulated/0")
+ val widget = Widget(null, mWidgetId, mFolderPath)
Thread {
widgetsDB.insertOrUpdate(widget)
}.start()
@@ -135,11 +132,13 @@ class WidgetConfigureActivity : SimpleActivity() {
private fun updateFolderImage(folderPath: String) {
mFolderPath = folderPath
- val tmb = mDirectories.firstOrNull { it.path == folderPath }?.tmb
- if (tmb != null) {
- runOnUiThread {
- loadJpg(tmb, config_image, true)
+ Thread {
+ val path = directoryDB.getDirectoryThumbnail(folderPath)
+ if (path != null) {
+ runOnUiThread {
+ loadJpg(path, config_image, true)
+ }
}
- }
+ }.start()
}
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt
index 2e7cdb0a3..161d131e7 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt
@@ -107,6 +107,8 @@ val Context.galleryDB: GalleryDatabase get() = GalleryDatabase.getInstance(appli
val Context.widgetsDB: WidgetsDao get() = GalleryDatabase.getInstance(applicationContext).WidgetsDao()
+val Context.directoryDB: DirectoryDao get() = GalleryDatabase.getInstance(applicationContext).DirectoryDao()
+
val Context.recycleBin: File get() = filesDir
val Context.recycleBinPath: String get() = filesDir.absolutePath
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/DirectoryDao.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/DirectoryDao.kt
index 78641ebf9..57d6807c2 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/DirectoryDao.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/DirectoryDao.kt
@@ -29,4 +29,7 @@ interface DirectoryDao {
@Query("DELETE FROM directories WHERE path = \'$RECYCLE_BIN\' COLLATE NOCASE")
fun deleteRecycleBin()
+
+ @Query("SELECT thumbnail FROM directories WHERE path = :path")
+ fun getDirectoryThumbnail(path: String): String?
}
From 3e06d787910a8c1b263197c92e225778562696a3 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 18:02:13 +0100
Subject: [PATCH 43/99] show the image at the widget
---
.../gallery/pro/activities/MainActivity.kt | 2 ++
.../gallery/pro/extensions/Context.kt | 13 ++++++++
.../gallery/pro/helpers/MyWidgetProvider.kt | 33 +++++++++++++++++--
app/src/main/res/layout/widget.xml | 3 +-
app/src/main/res/layout/widget_config.xml | 7 ++--
app/src/main/res/values/dimens.xml | 1 +
app/src/main/res/xml/widget_info.xml | 2 +-
7 files changed, 54 insertions(+), 7 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index 3af4e7043..f4345f291 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -145,6 +145,8 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
config.filterMedia += TYPE_SVGS
}
}
+
+ updateWidgets()
}
override fun onStart() {
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt
index 161d131e7..17b0a2db9 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/extensions/Context.kt
@@ -1,5 +1,7 @@
package com.simplemobiletools.gallery.pro.extensions
+import android.appwidget.AppWidgetManager
+import android.content.ComponentName
import android.content.Context
import android.content.Intent
import android.content.res.Configuration
@@ -487,3 +489,14 @@ fun Context.getUpdatedDeletedMedia(mediumDao: MediumDao): ArrayList {
fun Context.deleteDBPath(mediumDao: MediumDao, path: String) {
mediumDao.deleteMediumPath(path.replaceFirst(recycleBinPath, RECYCLE_BIN))
}
+
+fun Context.updateWidgets() {
+ val widgetIDs = AppWidgetManager.getInstance(applicationContext).getAppWidgetIds(ComponentName(applicationContext, MyWidgetProvider::class.java))
+ if (widgetIDs.isNotEmpty()) {
+ Intent(applicationContext, MyWidgetProvider::class.java).apply {
+ action = AppWidgetManager.ACTION_APPWIDGET_UPDATE
+ putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, widgetIDs)
+ sendBroadcast(this)
+ }
+ }
+}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
index 08ef3081c..1affe0ec4 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
@@ -3,13 +3,23 @@ package com.simplemobiletools.gallery.pro.helpers
import android.app.PendingIntent
import android.appwidget.AppWidgetManager
import android.appwidget.AppWidgetProvider
+import android.content.ComponentName
import android.content.Context
import android.content.Intent
+import android.os.Handler
+import android.os.Looper
+import android.util.Log
import android.widget.RemoteViews
+import com.bumptech.glide.Glide
+import com.bumptech.glide.load.engine.DiskCacheStrategy
+import com.bumptech.glide.request.RequestOptions
+import com.bumptech.glide.request.target.AppWidgetTarget
import com.simplemobiletools.commons.extensions.setBackgroundColor
import com.simplemobiletools.gallery.pro.R
import com.simplemobiletools.gallery.pro.activities.MediaActivity
import com.simplemobiletools.gallery.pro.extensions.config
+import com.simplemobiletools.gallery.pro.extensions.directoryDB
+import com.simplemobiletools.gallery.pro.extensions.getFileSignature
import com.simplemobiletools.gallery.pro.extensions.widgetsDB
import com.simplemobiletools.gallery.pro.models.Widget
@@ -29,8 +39,27 @@ class MyWidgetProvider : AppWidgetProvider() {
context.widgetsDB.getWidgets().forEach {
val views = RemoteViews(context.packageName, R.layout.widget)
views.setBackgroundColor(R.id.widget_holder, context.config.widgetBgColor)
- setupAppOpenIntent(context, views, R.id.widget_holder, it)
- appWidgetManager.updateAppWidget(it.widgetId, views)
+
+ val path = context.directoryDB.getDirectoryThumbnail(it.folderPath)
+ val options = RequestOptions()
+ .signature(path!!.getFileSignature())
+ .diskCacheStrategy(DiskCacheStrategy.RESOURCE)
+ if (context.config.cropThumbnails) options.centerCrop() else options.fitCenter()
+
+ Handler(Looper.getMainLooper()).post {
+ val widgetSize = context.resources.getDimension(R.dimen.widget_initial_width).toInt()
+ val componentName = ComponentName(context, MyWidgetProvider::class.java)
+ val appWidgetTarget = object : AppWidgetTarget(context, widgetSize, widgetSize, R.id.widget_imageview, views, componentName) {}
+
+ Glide.with(context)
+ .asBitmap()
+ .load(path)
+ .apply(options)
+ .into(appWidgetTarget)
+
+ setupAppOpenIntent(context, views, R.id.widget_holder, it)
+ appWidgetManager.updateAppWidget(it.widgetId, views)
+ }
}
}.start()
}
diff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml
index 2be9e64d5..825e4ab54 100644
--- a/app/src/main/res/layout/widget.xml
+++ b/app/src/main/res/layout/widget.xml
@@ -1,6 +1,7 @@
@@ -9,6 +10,6 @@
android:id="@+id/widget_imageview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
- android:src="@mipmap/ic_launcher"/>
+ tools:src="@mipmap/ic_launcher"/>
diff --git a/app/src/main/res/layout/widget_config.xml b/app/src/main/res/layout/widget_config.xml
index d8b56d5d1..bc9624e00 100644
--- a/app/src/main/res/layout/widget_config.xml
+++ b/app/src/main/res/layout/widget_config.xml
@@ -33,9 +33,10 @@
+ android:layout_width="134dp"
+ android:layout_height="134dp"
+ android:layout_below="@+id/folder_picker_holder"
+ android:padding="@dimen/normal_margin">
90dp
180dp
86dp
+ 110dp
diff --git a/app/src/main/res/xml/widget_info.xml b/app/src/main/res/xml/widget_info.xml
index ecfa6d765..ad8f3ab5f 100644
--- a/app/src/main/res/xml/widget_info.xml
+++ b/app/src/main/res/xml/widget_info.xml
@@ -3,7 +3,7 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:configure="com.simplemobiletools.gallery.pro.activities.WidgetConfigureActivity"
android:initialLayout="@layout/widget"
- android:minWidth="40dp"
+ android:minWidth="@dimen/widget_initial_width"
android:minHeight="40dp"
android:minResizeWidth="40dp"
android:minResizeHeight="40dp"
From 65aa2224bd5670c8ce4b0aa665ed8e58a15e5cca Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 18:04:45 +0100
Subject: [PATCH 44/99] renaming widget_config to activity_widget_config
---
.../gallery/pro/activities/WidgetConfigureActivity.kt | 4 ++--
.../layout/{widget_config.xml => activity_widget_config.xml} | 0
2 files changed, 2 insertions(+), 2 deletions(-)
rename app/src/main/res/layout/{widget_config.xml => activity_widget_config.xml} (100%)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index a656c01ec..c2f80f0e3 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -15,7 +15,7 @@ import com.simplemobiletools.gallery.pro.extensions.*
import com.simplemobiletools.gallery.pro.helpers.MyWidgetProvider
import com.simplemobiletools.gallery.pro.models.Directory
import com.simplemobiletools.gallery.pro.models.Widget
-import kotlinx.android.synthetic.main.widget_config.*
+import kotlinx.android.synthetic.main.activity_widget_config.*
class WidgetConfigureActivity : SimpleActivity() {
private var mBgAlpha = 0f
@@ -29,7 +29,7 @@ class WidgetConfigureActivity : SimpleActivity() {
useDynamicTheme = false
super.onCreate(savedInstanceState)
setResult(RESULT_CANCELED)
- setContentView(R.layout.widget_config)
+ setContentView(R.layout.activity_widget_config)
initVariables()
mWidgetId = intent.extras?.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID) ?: AppWidgetManager.INVALID_APPWIDGET_ID
diff --git a/app/src/main/res/layout/widget_config.xml b/app/src/main/res/layout/activity_widget_config.xml
similarity index 100%
rename from app/src/main/res/layout/widget_config.xml
rename to app/src/main/res/layout/activity_widget_config.xml
From ee037d88418de2771286ac37f72804ee3da854e9 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 18:15:32 +0100
Subject: [PATCH 45/99] adding a new string for toggling folder name visibility
---
app/src/main/res/values-ar/strings.xml | 1 +
app/src/main/res/values-az/strings.xml | 1 +
app/src/main/res/values-ca/strings.xml | 1 +
app/src/main/res/values-cs/strings.xml | 1 +
app/src/main/res/values-da/strings.xml | 1 +
app/src/main/res/values-de/strings.xml | 1 +
app/src/main/res/values-el/strings.xml | 1 +
app/src/main/res/values-es/strings.xml | 1 +
app/src/main/res/values-fi/strings.xml | 1 +
app/src/main/res/values-fr/strings.xml | 1 +
app/src/main/res/values-gl/strings.xml | 1 +
app/src/main/res/values-hr/strings.xml | 1 +
app/src/main/res/values-hu/strings.xml | 1 +
app/src/main/res/values-id/strings.xml | 1 +
app/src/main/res/values-it/strings.xml | 1 +
app/src/main/res/values-ja/strings.xml | 1 +
app/src/main/res/values-ko-rKR/strings.xml | 1 +
app/src/main/res/values-lt/strings.xml | 1 +
app/src/main/res/values-nb/strings.xml | 1 +
app/src/main/res/values-nl/strings.xml | 1 +
app/src/main/res/values-pl/strings.xml | 1 +
app/src/main/res/values-pt-rBR/strings.xml | 1 +
app/src/main/res/values-pt/strings.xml | 1 +
app/src/main/res/values-ru/strings.xml | 1 +
app/src/main/res/values-sk/strings.xml | 1 +
app/src/main/res/values-sl/strings.xml | 1 +
app/src/main/res/values-sv/strings.xml | 1 +
app/src/main/res/values-tr/strings.xml | 1 +
app/src/main/res/values-uk/strings.xml | 1 +
app/src/main/res/values-zh-rCN/strings.xml | 1 +
app/src/main/res/values-zh-rTW/strings.xml | 1 +
app/src/main/res/values/strings.xml | 1 +
32 files changed, 32 insertions(+)
diff --git a/app/src/main/res/values-ar/strings.xml b/app/src/main/res/values-ar/strings.xml
index ec2a2ab88..4f9e5a2c7 100644
--- a/app/src/main/res/values-ar/strings.xml
+++ b/app/src/main/res/values-ar/strings.xml
@@ -138,6 +138,7 @@
Folder shown on the widget:
+ Show folder name
تشغيل الفديوهات تلقائيا
diff --git a/app/src/main/res/values-az/strings.xml b/app/src/main/res/values-az/strings.xml
index 0735b5932..372505031 100644
--- a/app/src/main/res/values-az/strings.xml
+++ b/app/src/main/res/values-az/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Play videos automatically
diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml
index faedd7c3a..73db877c5 100644
--- a/app/src/main/res/values-ca/strings.xml
+++ b/app/src/main/res/values-ca/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Reproduir vídeos automàticament
diff --git a/app/src/main/res/values-cs/strings.xml b/app/src/main/res/values-cs/strings.xml
index 4c89cc9e1..e8706c85b 100644
--- a/app/src/main/res/values-cs/strings.xml
+++ b/app/src/main/res/values-cs/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Automaticky přehrávat videa
diff --git a/app/src/main/res/values-da/strings.xml b/app/src/main/res/values-da/strings.xml
index 13f5116a5..1897f290f 100644
--- a/app/src/main/res/values-da/strings.xml
+++ b/app/src/main/res/values-da/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Afspil automatisk videoer
diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml
index 899498d63..55f324318 100644
--- a/app/src/main/res/values-de/strings.xml
+++ b/app/src/main/res/values-de/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Videos automatisch abspielen
diff --git a/app/src/main/res/values-el/strings.xml b/app/src/main/res/values-el/strings.xml
index f40f40588..0f0fee167 100644
--- a/app/src/main/res/values-el/strings.xml
+++ b/app/src/main/res/values-el/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Αυτόματη αναπαραγωγή βίντεο
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index b2b3fc787..f785f99b1 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Reproducir vídeos automáticamente
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index 45692fb47..0ebaef866 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Toista videot automaattisesti
diff --git a/app/src/main/res/values-fr/strings.xml b/app/src/main/res/values-fr/strings.xml
index ae51914a6..5af44b0a6 100644
--- a/app/src/main/res/values-fr/strings.xml
+++ b/app/src/main/res/values-fr/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Lecture automatique des vidéos
diff --git a/app/src/main/res/values-gl/strings.xml b/app/src/main/res/values-gl/strings.xml
index 301428866..79e7592bc 100644
--- a/app/src/main/res/values-gl/strings.xml
+++ b/app/src/main/res/values-gl/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Reproducir vídeos automticamente
diff --git a/app/src/main/res/values-hr/strings.xml b/app/src/main/res/values-hr/strings.xml
index 2189a198c..8fee29889 100644
--- a/app/src/main/res/values-hr/strings.xml
+++ b/app/src/main/res/values-hr/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Automatsko pokretanje videa
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 5d21de866..502ce33a2 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -135,6 +135,7 @@
Folder shown on the widget:
+ Show folder name
Automatikus videó lejátszás
diff --git a/app/src/main/res/values-id/strings.xml b/app/src/main/res/values-id/strings.xml
index cbcce0246..319a68155 100644
--- a/app/src/main/res/values-id/strings.xml
+++ b/app/src/main/res/values-id/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Putar video otomatis
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 467db5d4c..1103e733c 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Riproduci i video automaticamente
diff --git a/app/src/main/res/values-ja/strings.xml b/app/src/main/res/values-ja/strings.xml
index d728d7c25..397e4e88f 100644
--- a/app/src/main/res/values-ja/strings.xml
+++ b/app/src/main/res/values-ja/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
ビデオを自動再生
diff --git a/app/src/main/res/values-ko-rKR/strings.xml b/app/src/main/res/values-ko-rKR/strings.xml
index 2ab9b6ef7..aef49c472 100644
--- a/app/src/main/res/values-ko-rKR/strings.xml
+++ b/app/src/main/res/values-ko-rKR/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
비디오 자동재생
diff --git a/app/src/main/res/values-lt/strings.xml b/app/src/main/res/values-lt/strings.xml
index 2e9d2c20a..d791865cf 100644
--- a/app/src/main/res/values-lt/strings.xml
+++ b/app/src/main/res/values-lt/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Groti vaizdo įrašus automatiškai
diff --git a/app/src/main/res/values-nb/strings.xml b/app/src/main/res/values-nb/strings.xml
index d3837c681..6b42ebde8 100644
--- a/app/src/main/res/values-nb/strings.xml
+++ b/app/src/main/res/values-nb/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Avspill videoer automatisk
diff --git a/app/src/main/res/values-nl/strings.xml b/app/src/main/res/values-nl/strings.xml
index 3e49c2d21..4ca63db33 100644
--- a/app/src/main/res/values-nl/strings.xml
+++ b/app/src/main/res/values-nl/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Video\'s automatisch afspelen
diff --git a/app/src/main/res/values-pl/strings.xml b/app/src/main/res/values-pl/strings.xml
index f0d171f35..42ba52f06 100644
--- a/app/src/main/res/values-pl/strings.xml
+++ b/app/src/main/res/values-pl/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Odtwarzaj filmy automatycznie
diff --git a/app/src/main/res/values-pt-rBR/strings.xml b/app/src/main/res/values-pt-rBR/strings.xml
index 71ce1c7fa..cb971ca18 100644
--- a/app/src/main/res/values-pt-rBR/strings.xml
+++ b/app/src/main/res/values-pt-rBR/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Reproduzir vídeos automaticamente
diff --git a/app/src/main/res/values-pt/strings.xml b/app/src/main/res/values-pt/strings.xml
index 6c95bdbe9..bff249a51 100644
--- a/app/src/main/res/values-pt/strings.xml
+++ b/app/src/main/res/values-pt/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Reproduzir vídeos automaticamente
diff --git a/app/src/main/res/values-ru/strings.xml b/app/src/main/res/values-ru/strings.xml
index ce0b4eca0..0b45427f3 100644
--- a/app/src/main/res/values-ru/strings.xml
+++ b/app/src/main/res/values-ru/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Воспроизводить видео автоматически
diff --git a/app/src/main/res/values-sk/strings.xml b/app/src/main/res/values-sk/strings.xml
index 255f819ed..f6592eb1d 100644
--- a/app/src/main/res/values-sk/strings.xml
+++ b/app/src/main/res/values-sk/strings.xml
@@ -134,6 +134,7 @@
Priečinok zobrazený vo widgete:
+ Zobraziť názov priečinka
Spúšťať videá automaticky
diff --git a/app/src/main/res/values-sl/strings.xml b/app/src/main/res/values-sl/strings.xml
index df296d51e..e8b8941e8 100644
--- a/app/src/main/res/values-sl/strings.xml
+++ b/app/src/main/res/values-sl/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Avtomatično predvajaj videoposnetke
diff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml
index 81d51588d..45da7bafb 100644
--- a/app/src/main/res/values-sv/strings.xml
+++ b/app/src/main/res/values-sv/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Spela upp videor automatiskt
diff --git a/app/src/main/res/values-tr/strings.xml b/app/src/main/res/values-tr/strings.xml
index efd1df962..33bdcfecb 100644
--- a/app/src/main/res/values-tr/strings.xml
+++ b/app/src/main/res/values-tr/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Videoları otomatik oynat
diff --git a/app/src/main/res/values-uk/strings.xml b/app/src/main/res/values-uk/strings.xml
index e73252288..7c72f4054 100644
--- a/app/src/main/res/values-uk/strings.xml
+++ b/app/src/main/res/values-uk/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Відтворювати відео автоматично
diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml
index 30d9d0ab0..e77503681 100644
--- a/app/src/main/res/values-zh-rCN/strings.xml
+++ b/app/src/main/res/values-zh-rCN/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
自动播放
diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml
index ee13dfe07..0024f2985 100644
--- a/app/src/main/res/values-zh-rTW/strings.xml
+++ b/app/src/main/res/values-zh-rTW/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
自動播放影片
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 7df94fa7e..808d89d8b 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -134,6 +134,7 @@
Folder shown on the widget:
+ Show folder name
Play videos automatically
From 7c8f89cf82b84dd771becce6aae52cc01bcb067f Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 18:24:49 +0100
Subject: [PATCH 46/99] add a toggle at widget config screen for toggling
folder name visibility
---
.../pro/activities/WidgetConfigureActivity.kt | 1 +
.../res/layout/activity_widget_config.xml | 28 ++++++++++++++++++-
2 files changed, 28 insertions(+), 1 deletion(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index c2f80f0e3..572f2cca5 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -42,6 +42,7 @@ class WidgetConfigureActivity : SimpleActivity() {
config_bg_color.setOnClickListener { pickBackgroundColor() }
folder_picker_value.setOnClickListener { changeSelectedFolder() }
config_image_holder.setOnClickListener { changeSelectedFolder() }
+ folder_picker_show_folder_name_holder.setOnClickListener { }
config_save.setTextColor(getAdjustedPrimaryColor())
updateTextColors(folder_picker_holder)
folder_picker_holder.background = ColorDrawable(config.backgroundColor)
diff --git a/app/src/main/res/layout/activity_widget_config.xml b/app/src/main/res/layout/activity_widget_config.xml
index bc9624e00..a8d277b1d 100644
--- a/app/src/main/res/layout/activity_widget_config.xml
+++ b/app/src/main/res/layout/activity_widget_config.xml
@@ -1,6 +1,7 @@
+ android:paddingBottom="@dimen/activity_margin">
+
+
+
+
+
+
From 66699f1f604e86397c92314b294fe38a5a620802 Mon Sep 17 00:00:00 2001
From: Emanuele Petriglia
Date: Sun, 16 Dec 2018 17:49:09 +0000
Subject: [PATCH 47/99] Add translations for folder on the widget
---
app/src/main/res/values-it/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-it/strings.xml b/app/src/main/res/values-it/strings.xml
index 1103e733c..fc126811d 100644
--- a/app/src/main/res/values-it/strings.xml
+++ b/app/src/main/res/values-it/strings.xml
@@ -133,8 +133,8 @@
Estensione
- Folder shown on the widget:
- Show folder name
+ Cartella mostrata nel widget:
+ Mostra il nome della cartella
Riproduci i video automaticamente
From 7e88e6787b81254deb0a092d518031a6c06c7c0a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Hevesi=20J=C3=A1nos?=
<44799533+hevesij@users.noreply.github.com>
Date: Sun, 16 Dec 2018 19:25:20 +0100
Subject: [PATCH 48/99] Updated Hungarian translation
---
app/src/main/res/values-hu/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-hu/strings.xml b/app/src/main/res/values-hu/strings.xml
index 502ce33a2..bdfeb0610 100644
--- a/app/src/main/res/values-hu/strings.xml
+++ b/app/src/main/res/values-hu/strings.xml
@@ -134,8 +134,8 @@
Kiterjesztés
- Folder shown on the widget:
- Show folder name
+ Mappa mutatása a widgeten:
+ Mutassa a mappa nevét
Automatikus videó lejátszás
From dd537c63f3fbbc0bf75a372b0618f179ba6b1bef Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 19:31:59 +0100
Subject: [PATCH 49/99] adding a text color changer at the widget config screen
---
.../pro/activities/WidgetConfigureActivity.kt | 28 +++++++++++++++++--
.../gallery/pro/helpers/Config.kt | 4 +++
.../gallery/pro/helpers/Constants.kt | 1 +
.../gallery/pro/helpers/MyWidgetProvider.kt | 3 +-
.../res/layout/activity_widget_config.xml | 6 ++++
app/src/main/res/values/dimens.xml | 2 +-
app/src/main/res/xml/widget_info.xml | 4 +--
7 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index 572f2cca5..eebddb6a6 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -22,6 +22,7 @@ class WidgetConfigureActivity : SimpleActivity() {
private var mWidgetId = 0
private var mBgColor = 0
private var mBgColorWithoutTransparency = 0
+ private var mTextColor = 0
private var mFolderPath = ""
private var mDirectories = ArrayList()
@@ -40,10 +41,11 @@ class WidgetConfigureActivity : SimpleActivity() {
config_save.setOnClickListener { saveConfig() }
config_bg_color.setOnClickListener { pickBackgroundColor() }
+ config_text_color.setOnClickListener { pickTextColor() }
folder_picker_value.setOnClickListener { changeSelectedFolder() }
config_image_holder.setOnClickListener { changeSelectedFolder() }
- folder_picker_show_folder_name_holder.setOnClickListener { }
- config_save.setTextColor(getAdjustedPrimaryColor())
+ folder_picker_show_folder_name.isChecked = config.showWidgetFolderName
+ folder_picker_show_folder_name_holder.setOnClickListener { toggleFolderNameDisplay() }
updateTextColors(folder_picker_holder)
folder_picker_holder.background = ColorDrawable(config.backgroundColor)
@@ -75,12 +77,16 @@ class WidgetConfigureActivity : SimpleActivity() {
}
}
updateBackgroundColor()
+
+ mTextColor = config.widgetTextColor
+ updateTextColor()
}
private fun saveConfig() {
val views = RemoteViews(packageName, R.layout.widget)
views.setBackgroundColor(R.id.widget_holder, mBgColor)
AppWidgetManager.getInstance(this).updateAppWidget(mWidgetId, views)
+ config.showWidgetFolderName = folder_picker_show_folder_name.isChecked
val widget = Widget(null, mWidgetId, mFolderPath)
Thread {
widgetsDB.insertOrUpdate(widget)
@@ -116,6 +122,11 @@ class WidgetConfigureActivity : SimpleActivity() {
config_bg_color.setFillWithStroke(mBgColor, Color.BLACK)
}
+ private fun updateTextColor() {
+ config_save.setTextColor(mTextColor)
+ config_text_color.setFillWithStroke(mTextColor, Color.BLACK)
+ }
+
private fun pickBackgroundColor() {
ColorPickerDialog(this, mBgColorWithoutTransparency) { wasPositivePressed, color ->
if (wasPositivePressed) {
@@ -125,6 +136,15 @@ class WidgetConfigureActivity : SimpleActivity() {
}
}
+ private fun pickTextColor() {
+ ColorPickerDialog(this, mTextColor) { wasPositivePressed, color ->
+ if (wasPositivePressed) {
+ mTextColor = color
+ updateTextColor()
+ }
+ }
+ }
+
private fun changeSelectedFolder() {
PickDirectoryDialog(this, mFolderPath, false) {
updateFolderImage(it)
@@ -142,4 +162,8 @@ class WidgetConfigureActivity : SimpleActivity() {
}
}.start()
}
+
+ private fun toggleFolderNameDisplay() {
+ folder_picker_show_folder_name.toggle()
+ }
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt
index 3016cf54f..cdb7ef840 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Config.kt
@@ -427,4 +427,8 @@ class Config(context: Context) : BaseConfig(context) {
var groupDirectSubfolders: Boolean
get() = prefs.getBoolean(GROUP_DIRECT_SUBFOLDERS, false)
set(groupDirectSubfolders) = prefs.edit().putBoolean(GROUP_DIRECT_SUBFOLDERS, groupDirectSubfolders).apply()
+
+ var showWidgetFolderName: Boolean
+ get() = prefs.getBoolean(SHOW_WIDGET_FOLDER_NAME, true)
+ set(showWidgetFolderName) = prefs.edit().putBoolean(SHOW_WIDGET_FOLDER_NAME, showWidgetFolderName).apply()
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt
index 03d5b8436..95a068eb0 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/Constants.kt
@@ -72,6 +72,7 @@ const val LAST_EDITOR_CROP_ASPECT_RATIO = "last_editor_crop_aspect_ratio"
const val LAST_EDITOR_CROP_OTHER_ASPECT_RATIO_X = "last_editor_crop_other_aspect_ratio_x"
const val LAST_EDITOR_CROP_OTHER_ASPECT_RATIO_Y = "last_editor_crop_other_aspect_ratio_y"
const val GROUP_DIRECT_SUBFOLDERS = "group_direct_subfolders"
+const val SHOW_WIDGET_FOLDER_NAME = "show_widget_folder_name"
// slideshow
const val SLIDESHOW_INTERVAL = "slideshow_interval"
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
index 1affe0ec4..eb88404f7 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
@@ -8,7 +8,6 @@ import android.content.Context
import android.content.Intent
import android.os.Handler
import android.os.Looper
-import android.util.Log
import android.widget.RemoteViews
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
@@ -47,7 +46,7 @@ class MyWidgetProvider : AppWidgetProvider() {
if (context.config.cropThumbnails) options.centerCrop() else options.fitCenter()
Handler(Looper.getMainLooper()).post {
- val widgetSize = context.resources.getDimension(R.dimen.widget_initial_width).toInt()
+ val widgetSize = context.resources.getDimension(R.dimen.widget_initial_size).toInt()
val componentName = ComponentName(context, MyWidgetProvider::class.java)
val appWidgetTarget = object : AppWidgetTarget(context, widgetSize, widgetSize, R.id.widget_imageview, views, componentName) {}
diff --git a/app/src/main/res/layout/activity_widget_config.xml b/app/src/main/res/layout/activity_widget_config.xml
index a8d277b1d..cda0e7f48 100644
--- a/app/src/main/res/layout/activity_widget_config.xml
+++ b/app/src/main/res/layout/activity_widget_config.xml
@@ -96,6 +96,12 @@
android:paddingRight="@dimen/activity_margin"/>
+
+
From e3964a1b9146a71dcce05eb6c191aa19b4eb575f Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 20:10:04 +0100
Subject: [PATCH 52/99] update selected folder path at the folder picker at
widget config
---
.../gallery/pro/activities/WidgetConfigureActivity.kt | 1 +
app/src/main/res/layout/activity_widget_config.xml | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index 050590036..bfc86a186 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -160,6 +160,7 @@ class WidgetConfigureActivity : SimpleActivity() {
private fun updateFolderImage(folderPath: String) {
mFolderPath = folderPath
+ folder_picker_value.text = getFolderNameFromPath(folderPath)
runOnUiThread {
config_folder_name.text = getFolderNameFromPath(folderPath)
}
diff --git a/app/src/main/res/layout/activity_widget_config.xml b/app/src/main/res/layout/activity_widget_config.xml
index b1b73a73d..27660cce8 100644
--- a/app/src/main/res/layout/activity_widget_config.xml
+++ b/app/src/main/res/layout/activity_widget_config.xml
@@ -54,7 +54,7 @@
android:layout_marginLeft="@dimen/activity_margin"
android:background="@drawable/button_background"
android:padding="@dimen/normal_margin"
- android:text="@string/internal"/>
+ tools:text="@string/internal"/>
From 92bf2acc56b4c19b7802a3c3a2d7974fc0f8fd25 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 20:31:13 +0100
Subject: [PATCH 53/99] make sure we update the widget config folder name from
the proper thread
---
.../gallery/pro/activities/WidgetConfigureActivity.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index bfc86a186..e7dcfe976 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -160,8 +160,8 @@ class WidgetConfigureActivity : SimpleActivity() {
private fun updateFolderImage(folderPath: String) {
mFolderPath = folderPath
- folder_picker_value.text = getFolderNameFromPath(folderPath)
runOnUiThread {
+ folder_picker_value.text = getFolderNameFromPath(folderPath)
config_folder_name.text = getFolderNameFromPath(folderPath)
}
From 7fc10d74d44cf516ccdb2473436ad6d4c9fd3dde Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 20:31:25 +0100
Subject: [PATCH 54/99] update the widgets at opening the Media Activity too
---
.../simplemobiletools/gallery/pro/activities/MediaActivity.kt | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt
index 7276b23f9..e215c2c18 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MediaActivity.kt
@@ -118,6 +118,8 @@ class MediaActivity : SimpleActivity(), MediaOperationsListener {
media_empty_text.setOnClickListener {
showFilterMediaDialog()
}
+
+ updateWidgets()
}
override fun onStart() {
From 069d991facde799be5341b4d3c991f14aebd7707 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 20:55:41 +0100
Subject: [PATCH 55/99] fix some threading issues related to widgets
---
.../gallery/pro/helpers/MyWidgetProvider.kt | 36 +++++++++----------
1 file changed, 16 insertions(+), 20 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
index c4a8229f9..f61831a30 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
@@ -3,16 +3,12 @@ package com.simplemobiletools.gallery.pro.helpers
import android.app.PendingIntent
import android.appwidget.AppWidgetManager
import android.appwidget.AppWidgetProvider
-import android.content.ComponentName
import android.content.Context
import android.content.Intent
-import android.os.Handler
-import android.os.Looper
import android.widget.RemoteViews
import com.bumptech.glide.Glide
import com.bumptech.glide.load.engine.DiskCacheStrategy
import com.bumptech.glide.request.RequestOptions
-import com.bumptech.glide.request.target.AppWidgetTarget
import com.simplemobiletools.commons.extensions.setBackgroundColor
import com.simplemobiletools.commons.extensions.setText
import com.simplemobiletools.commons.extensions.setVisibleIf
@@ -34,11 +30,13 @@ class MyWidgetProvider : AppWidgetProvider() {
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) {
super.onUpdate(context, appWidgetManager, appWidgetIds)
Thread {
- context.widgetsDB.getWidgets().forEach {
+ val widgets = context.widgetsDB.getWidgets()
+ val config = context.config
+ widgets.forEach {
val views = RemoteViews(context.packageName, R.layout.widget).apply {
- setBackgroundColor(R.id.widget_holder, context.config.widgetBgColor)
- setVisibleIf(R.id.widget_folder_name, context.config.showWidgetFolderName)
- setTextColor(R.id.widget_folder_name, context.config.widgetTextColor)
+ setBackgroundColor(R.id.widget_holder, config.widgetBgColor)
+ setVisibleIf(R.id.widget_folder_name, config.showWidgetFolderName)
+ setTextColor(R.id.widget_folder_name, config.widgetTextColor)
setText(R.id.widget_folder_name, context.getFolderNameFromPath(it.folderPath))
}
@@ -48,20 +46,18 @@ class MyWidgetProvider : AppWidgetProvider() {
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
if (context.config.cropThumbnails) options.centerCrop() else options.fitCenter()
- Handler(Looper.getMainLooper()).post {
- val widgetSize = context.resources.getDimension(R.dimen.widget_initial_size).toInt()
- val componentName = ComponentName(context, MyWidgetProvider::class.java)
- val appWidgetTarget = object : AppWidgetTarget(context, widgetSize, widgetSize, R.id.widget_imageview, views, componentName) {}
+ val widgetSize = context.resources.getDimension(R.dimen.widget_initial_size).toInt()
+ val image = Glide.with(context)
+ .asBitmap()
+ .load(path)
+ .apply(options)
+ .submit(widgetSize, widgetSize)
+ .get()
- Glide.with(context)
- .asBitmap()
- .load(path)
- .apply(options)
- .into(appWidgetTarget)
+ views.setImageViewBitmap(R.id.widget_imageview, image)
- setupAppOpenIntent(context, views, R.id.widget_holder, it)
- appWidgetManager.updateAppWidget(it.widgetId, views)
- }
+ setupAppOpenIntent(context, views, R.id.widget_holder, it)
+ appWidgetManager.updateAppWidget(it.widgetId, views)
}
}.start()
}
From 9e2847fb8f5de0a6b3f87cebf26be0f8f543cfeb Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 20:55:56 +0100
Subject: [PATCH 56/99] properly remove the widget ID from the database on
deletion
---
.../gallery/pro/helpers/MyWidgetProvider.kt | 12 ++++++++++--
.../gallery/pro/interfaces/WidgetsDao.kt | 4 ++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
index f61831a30..8ffba7f09 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/helpers/MyWidgetProvider.kt
@@ -30,9 +30,8 @@ class MyWidgetProvider : AppWidgetProvider() {
override fun onUpdate(context: Context, appWidgetManager: AppWidgetManager, appWidgetIds: IntArray) {
super.onUpdate(context, appWidgetManager, appWidgetIds)
Thread {
- val widgets = context.widgetsDB.getWidgets()
val config = context.config
- widgets.forEach {
+ context.widgetsDB.getWidgets().forEach {
val views = RemoteViews(context.packageName, R.layout.widget).apply {
setBackgroundColor(R.id.widget_holder, config.widgetBgColor)
setVisibleIf(R.id.widget_folder_name, config.showWidgetFolderName)
@@ -61,4 +60,13 @@ class MyWidgetProvider : AppWidgetProvider() {
}
}.start()
}
+
+ override fun onDeleted(context: Context, appWidgetIds: IntArray) {
+ super.onDeleted(context, appWidgetIds)
+ Thread {
+ appWidgetIds.forEach {
+ context.widgetsDB.deleteWidgetId(it)
+ }
+ }.start()
+ }
}
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/WidgetsDao.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/WidgetsDao.kt
index 72409ca35..b6ecb2492 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/WidgetsDao.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/interfaces/WidgetsDao.kt
@@ -14,6 +14,6 @@ interface WidgetsDao {
@Insert(onConflict = OnConflictStrategy.REPLACE)
fun insertOrUpdate(widget: Widget): Long
- @Query("DELETE FROM widgets WHERE folder_path = :folderPath")
- fun deleteNoteWidgets(folderPath: String)
+ @Query("DELETE FROM widgets WHERE widget_id = :widgetId")
+ fun deleteWidgetId(widgetId: Int)
}
From b812aeb7ce1508733cd58e3fa69b827a442c9ea8 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 21:10:06 +0100
Subject: [PATCH 57/99] tweak the widget responsivness a bit
---
app/src/main/res/layout/widget.xml | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml
index e54b0ace7..9692a32c2 100644
--- a/app/src/main/res/layout/widget.xml
+++ b/app/src/main/res/layout/widget.xml
@@ -10,13 +10,14 @@
android:id="@+id/widget_imageview"
android:layout_width="match_parent"
android:layout_height="wrap_content"
+ android:layout_above="@+id/widget_folder_name"
tools:src="@mipmap/ic_launcher"/>
Date: Sun, 16 Dec 2018 21:16:17 +0100
Subject: [PATCH 58/99] make the image on widget config screen wider
---
app/src/main/res/layout/activity_widget_config.xml | 3 ++-
app/src/main/res/xml/widget_info.xml | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/layout/activity_widget_config.xml b/app/src/main/res/layout/activity_widget_config.xml
index 27660cce8..ae762ab01 100644
--- a/app/src/main/res/layout/activity_widget_config.xml
+++ b/app/src/main/res/layout/activity_widget_config.xml
@@ -60,7 +60,7 @@
@@ -68,6 +68,7 @@
android:id="@+id/config_image"
android:layout_width="@dimen/widget_initial_size"
android:layout_height="@dimen/widget_initial_size"
+ android:layout_centerHorizontal="true"
android:layout_marginLeft="@dimen/normal_margin"
android:layout_marginTop="@dimen/normal_margin"
android:layout_marginRight="@dimen/normal_margin"/>
diff --git a/app/src/main/res/xml/widget_info.xml b/app/src/main/res/xml/widget_info.xml
index 4bb417b39..801061d71 100644
--- a/app/src/main/res/xml/widget_info.xml
+++ b/app/src/main/res/xml/widget_info.xml
@@ -4,7 +4,7 @@
android:configure="com.simplemobiletools.gallery.pro.activities.WidgetConfigureActivity"
android:initialLayout="@layout/widget"
android:minWidth="@dimen/widget_initial_size"
- android:minHeight="@dimen/widget_initial_size"
+ android:minHeight="40dp"
android:minResizeWidth="40dp"
android:minResizeHeight="40dp"
android:resizeMode="horizontal|vertical"/>
From e40963a6b879872c5bfbeb0667fd6fa1136063c9 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 21:18:02 +0100
Subject: [PATCH 59/99] crop thumbnails at widget config screen only if
selected so
---
.../gallery/pro/activities/WidgetConfigureActivity.kt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
index e7dcfe976..33f193181 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/WidgetConfigureActivity.kt
@@ -169,7 +169,7 @@ class WidgetConfigureActivity : SimpleActivity() {
val path = directoryDB.getDirectoryThumbnail(folderPath)
if (path != null) {
runOnUiThread {
- loadJpg(path, config_image, true)
+ loadJpg(path, config_image, config.cropThumbnails)
}
}
}.start()
From bc454195cef18e0ad5431d1f4796690c34bb5262 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 21:18:16 +0100
Subject: [PATCH 60/99] add a bit of top padding to the widget
---
app/src/main/res/layout/widget.xml | 1 +
1 file changed, 1 insertion(+)
diff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml
index 9692a32c2..76adb41b1 100644
--- a/app/src/main/res/layout/widget.xml
+++ b/app/src/main/res/layout/widget.xml
@@ -11,6 +11,7 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_above="@+id/widget_folder_name"
+ android:paddingTop="@dimen/tiny_margin"
tools:src="@mipmap/ic_launcher"/>
Date: Sun, 16 Dec 2018 22:00:46 +0100
Subject: [PATCH 61/99] adding a hackfix for disappearing recyclerview content
---
.../simplemobiletools/gallery/pro/activities/MainActivity.kt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
index b265d2e5e..76d68a1b2 100644
--- a/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
+++ b/app/src/main/kotlin/com/simplemobiletools/gallery/pro/activities/MainActivity.kt
@@ -1094,6 +1094,11 @@ class MainActivity : SimpleActivity(), DirectoryOperationsListener {
measureRecyclerViewContent(dirsToShow)
}
}
+
+ // recyclerview sometimes becomes empty at init/update, triggering an invisible refresh like this seems to work fine
+ directories_grid.postDelayed({
+ directories_grid.scrollBy(0, 0)
+ }, 500)
}
private fun setupScrollDirection() {
From 3d95f1612839e192f0595fac766db57d8635fd45 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Solatec=20Inform=C3=A0tica?=
<35220662+Solatec@users.noreply.github.com>
Date: Sun, 16 Dec 2018 22:16:39 +0100
Subject: [PATCH 62/99] Update strings.xml
---
app/src/main/res/values-ca/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-ca/strings.xml b/app/src/main/res/values-ca/strings.xml
index 73db877c5..df1bbe48b 100644
--- a/app/src/main/res/values-ca/strings.xml
+++ b/app/src/main/res/values-ca/strings.xml
@@ -133,8 +133,8 @@
Extensió
- Folder shown on the widget:
- Show folder name
+ Carpeta que es mostra a l\'estri:
+ Mostra el nom de la carpeta
Reproduir vídeos automàticament
From 6313374b9cb61b44f21b802225620d8a36892e01 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Solatec=20Inform=C3=A0tica?=
<35220662+Solatec@users.noreply.github.com>
Date: Sun, 16 Dec 2018 22:17:58 +0100
Subject: [PATCH 63/99] Update strings.xml
---
app/src/main/res/values-es/strings.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/src/main/res/values-es/strings.xml b/app/src/main/res/values-es/strings.xml
index f785f99b1..b10955ebc 100644
--- a/app/src/main/res/values-es/strings.xml
+++ b/app/src/main/res/values-es/strings.xml
@@ -133,8 +133,8 @@
Extensión
- Folder shown on the widget:
- Show folder name
+ Carpeta mostrada en el widget:
+ Mostrar nombre de carpeta
Reproducir vídeos automáticamente
From d2b75008d3f9e60d9b31d80965f9f3032c795e46 Mon Sep 17 00:00:00 2001
From: tibbi
Date: Sun, 16 Dec 2018 23:55:25 +0100
Subject: [PATCH 64/99] adding an image for the widget preview
---
app/src/main/AndroidManifest.xml | 2 +-
.../res/drawable-hdpi/img_widget_preview.png | Bin 0 -> 30639 bytes
.../res/drawable-xhdpi/img_widget_preview.png | Bin 0 -> 47791 bytes
.../res/drawable-xxhdpi/img_widget_preview.png | Bin 0 -> 67335 bytes
.../res/drawable-xxxhdpi/img_widget_preview.png | Bin 0 -> 90772 bytes
app/src/main/res/xml/widget_info.xml | 1 +
6 files changed, 2 insertions(+), 1 deletion(-)
create mode 100644 app/src/main/res/drawable-hdpi/img_widget_preview.png
create mode 100644 app/src/main/res/drawable-xhdpi/img_widget_preview.png
create mode 100644 app/src/main/res/drawable-xxhdpi/img_widget_preview.png
create mode 100644 app/src/main/res/drawable-xxxhdpi/img_widget_preview.png
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 883b24d4c..b00e56d71 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -244,7 +244,7 @@
+ android:icon="@drawable/img_widget_preview">
diff --git a/app/src/main/res/drawable-hdpi/img_widget_preview.png b/app/src/main/res/drawable-hdpi/img_widget_preview.png
new file mode 100644
index 0000000000000000000000000000000000000000..e3d372985be229c1a85a93bdb7042a33a5bee714
GIT binary patch
literal 30639
zcmb?>)mt0g7w(4#hu}p+gM=c*3KS2P1SqZriaW*KgS)%6xI=M=6fX|NN^y!5THJ~q
zei!Hb1?OVVer9gwnOVDC-V40{{`-#*4wF@X-hV!?WB~T_l^al;_q^dc
z!Sr1J`wyS&e+%uu>|E;q{$u(NE-S6+m3!1ZnqXw(v3u=XChBLVM8G#{K3P#&tzL7MOTVh!O4?9*j-U^z>gV6_hsl$7gBIsIXM>xbc9{ssCS*J@0(i+W#KO{%q-AW6+|NNoP@aJF-xo1#kOs7|v
zGfrD)TZ|6%|A*Vpf%{Y^99vdT8&t#YhP3~M$wB}@=*5}?)b$`BItlbK=6=i}G%--e
z_C7tQS35bVP>MH?a{C(l=gn)ODKk7dM~s2KO;h>R6JhzApZi6mSii3E`_Kc%bw?5Y7bAK&RJ7Tx>3U2RcrwC>!T4$~x&hQlBn|AEY@
zKL8_e8mS^QGADkosIZU#K)s9ijP{~qwIy^uzN!-{&bLV@brzTLOC
zl27N7-9PQ$JU*@T{(b6&o?t8C->W=7d|<5dIV~c=P)8uRNYqu+u+UK+>$4X`d*bSN
zO|wd@f|EG^P$o*!v7{g@b(^a^7CgDwD0TwwwD0n#CvC;wk)_uHGEiIP*d+3oWf6i_
zRYWXU1!CE!XZPrbVo{+p(NH_Y%d7$vyqZ$)?8225_SLMP#ok}>(Ba=vGmN5AMwnbT5$sMoh
zl#I1$e?w3AQM}B!>In9U>f*oR|;bGVLCXvEC0LX*!-nP~d
zEn1sI->(Iir}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