From af3b44d470657bab2700fd208110d956ab3ff40e Mon Sep 17 00:00:00 2001
From: Agnieszka C <85929121+Aga-C@users.noreply.github.com>
Date: Sun, 7 Nov 2021 19:42:08 +0100
Subject: [PATCH] Added stars to mark favorite items (#2102)
---
.../gallery/pro/adapters/MediaAdapter.kt | 3 +++
app/src/main/res/layout/photo_item_grid.xml | 12 ++++++++++++
app/src/main/res/layout/photo_item_list.xml | 12 ++++++++++++
app/src/main/res/layout/video_item_grid.xml | 14 +++++++++++++-
app/src/main/res/layout/video_item_list.xml | 12 ++++++++++++
5 files changed, 52 insertions(+), 1 deletion(-)
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 f052d1d7e..7a90b9cc9 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
@@ -35,6 +35,7 @@ import kotlinx.android.synthetic.main.photo_item_grid.view.*
import kotlinx.android.synthetic.main.thumbnail_section.view.*
import kotlinx.android.synthetic.main.video_item_grid.view.*
import kotlinx.android.synthetic.main.video_item_grid.view.media_item_holder
+import kotlinx.android.synthetic.main.video_item_grid.view.favorite
import kotlinx.android.synthetic.main.video_item_grid.view.medium_check
import kotlinx.android.synthetic.main.video_item_grid.view.medium_name
import kotlinx.android.synthetic.main.video_item_grid.view.medium_thumbnail
@@ -524,6 +525,8 @@ class MediaAdapter(
media_item_holder.setPadding(padding, padding, padding, padding)
+ favorite.beVisibleIf(medium.isFavorite)
+
play_portrait_outline?.beVisibleIf(medium.isVideo() || medium.isPortrait())
if (medium.isVideo()) {
play_portrait_outline?.setImageResource(R.drawable.ic_play_outline_vector)
diff --git a/app/src/main/res/layout/photo_item_grid.xml b/app/src/main/res/layout/photo_item_grid.xml
index 422bba8d1..96e080ee8 100644
--- a/app/src/main/res/layout/photo_item_grid.xml
+++ b/app/src/main/res/layout/photo_item_grid.xml
@@ -27,6 +27,18 @@
android:textSize="@dimen/bigger_text_size"
android:visibility="gone" />
+
+
+
+
+
+
+
+