From 2aed30bd72a3bfcabd7c9ea585a0b92ec3d8e38a Mon Sep 17 00:00:00 2001 From: tibbi Date: Tue, 3 Sep 2019 22:59:31 +0200 Subject: [PATCH] show gif/raw/svg indications at file thumbnails --- .../gallery/pro/adapters/MediaAdapter.kt | 14 ++++++++++++++ .../main/res/layout/photo_video_item_grid.xml | 15 +++++++++++++++ .../main/res/layout/photo_video_item_list.xml | 17 +++++++++++++++++ app/src/main/res/values/donottranslate.xml | 3 +++ 4 files changed, 49 insertions(+) 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 60730c194..dac29a18e 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 @@ -21,6 +21,8 @@ import com.simplemobiletools.gallery.pro.R import com.simplemobiletools.gallery.pro.dialogs.DeleteWithRememberDialog import com.simplemobiletools.gallery.pro.extensions.* import com.simplemobiletools.gallery.pro.helpers.SHOW_ALL +import com.simplemobiletools.gallery.pro.helpers.TYPE_GIFS +import com.simplemobiletools.gallery.pro.helpers.TYPE_RAWS import com.simplemobiletools.gallery.pro.helpers.VIEW_TYPE_LIST import com.simplemobiletools.gallery.pro.interfaces.MediaOperationsListener import com.simplemobiletools.gallery.pro.models.Medium @@ -445,6 +447,18 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList R.string.gif + TYPE_RAWS -> R.string.raw + else -> R.string.svg + }) + file_type.beVisible() + } else { + file_type.beGone() + } + medium_name.beVisibleIf(displayFilenames || isListViewType) medium_name.text = medium.name medium_name.tag = medium.path diff --git a/app/src/main/res/layout/photo_video_item_grid.xml b/app/src/main/res/layout/photo_video_item_grid.xml index 834214464..241f57980 100644 --- a/app/src/main/res/layout/photo_video_item_grid.xml +++ b/app/src/main/res/layout/photo_video_item_grid.xml @@ -24,6 +24,21 @@ android:src="@drawable/img_play_outline" android:visibility="gone"/> + + + + + GIF + RAW + SVG com.simplemobiletools.gallery.pro