From 7d218d780eab5fedc4ad8834418952b9fb5999b9 Mon Sep 17 00:00:00 2001
From: gmasil <54176035+gmasil@users.noreply.github.com>
Date: Tue, 19 Dec 2023 07:57:46 +0100
Subject: [PATCH 1/4] increase visibility of video duration in thumbnails
---
app/src/main/res/drawable/darkened_rounded_background.xml | 5 +++++
app/src/main/res/layout/video_item_grid.xml | 5 ++++-
2 files changed, 9 insertions(+), 1 deletion(-)
create mode 100644 app/src/main/res/drawable/darkened_rounded_background.xml
diff --git a/app/src/main/res/drawable/darkened_rounded_background.xml b/app/src/main/res/drawable/darkened_rounded_background.xml
new file mode 100644
index 000000000..fb279cd13
--- /dev/null
+++ b/app/src/main/res/drawable/darkened_rounded_background.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/app/src/main/res/layout/video_item_grid.xml b/app/src/main/res/layout/video_item_grid.xml
index c9cff3354..0cf042aae 100644
--- a/app/src/main/res/layout/video_item_grid.xml
+++ b/app/src/main/res/layout/video_item_grid.xml
@@ -41,7 +41,7 @@
android:layout_height="wrap_content"
android:layout_alignTop="@+id/play_portrait_outline"
android:layout_alignBottom="@+id/play_portrait_outline"
- android:layout_marginTop="@dimen/small_margin"
+ android:layout_marginTop="@dimen/tiny_margin"
android:layout_toEndOf="@id/play_portrait_outline"
android:ellipsize="end"
android:gravity="end"
@@ -51,6 +51,9 @@
android:textColor="@android:color/white"
android:textSize="@dimen/normal_text_size"
android:visibility="gone"
+ android:background="@drawable/darkened_rounded_background"
+ android:paddingTop="@dimen/one_dp"
+ android:paddingHorizontal="@dimen/small_margin"
tools:text="02:34" />
Date: Tue, 19 Dec 2023 15:29:19 +0100
Subject: [PATCH 2/4] combine play icon and duration of video thumbnails
---
.../fossify/gallery/adapters/MediaAdapter.kt | 2 +-
... darkened_automatic_circle_background.xml} | 2 +-
app/src/main/res/drawable/ic_play_vector.xml | 3 +
app/src/main/res/layout/video_item_grid.xml | 64 +++++++++++--------
4 files changed, 41 insertions(+), 30 deletions(-)
rename app/src/main/res/drawable/{darkened_rounded_background.xml => darkened_automatic_circle_background.xml} (73%)
create mode 100644 app/src/main/res/drawable/ic_play_vector.xml
diff --git a/app/src/main/kotlin/org/fossify/gallery/adapters/MediaAdapter.kt b/app/src/main/kotlin/org/fossify/gallery/adapters/MediaAdapter.kt
index 07f7f91b8..c40b45e9a 100644
--- a/app/src/main/kotlin/org/fossify/gallery/adapters/MediaAdapter.kt
+++ b/app/src/main/kotlin/org/fossify/gallery/adapters/MediaAdapter.kt
@@ -619,7 +619,7 @@ class MediaAdapter(
playPortraitOutline?.beVisibleIf(medium.isVideo() || medium.isPortrait())
if (medium.isVideo()) {
- playPortraitOutline?.setImageResource(org.fossify.commons.R.drawable.ic_play_outline_vector)
+ playPortraitOutline?.setImageResource(org.fossify.commons.R.drawable.ic_play_vector)
playPortraitOutline?.beVisible()
} else if (medium.isPortrait()) {
playPortraitOutline?.setImageResource(R.drawable.ic_portrait_photo_vector)
diff --git a/app/src/main/res/drawable/darkened_rounded_background.xml b/app/src/main/res/drawable/darkened_automatic_circle_background.xml
similarity index 73%
rename from app/src/main/res/drawable/darkened_rounded_background.xml
rename to app/src/main/res/drawable/darkened_automatic_circle_background.xml
index fb279cd13..ea41f18df 100644
--- a/app/src/main/res/drawable/darkened_rounded_background.xml
+++ b/app/src/main/res/drawable/darkened_automatic_circle_background.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/app/src/main/res/drawable/ic_play_vector.xml b/app/src/main/res/drawable/ic_play_vector.xml
new file mode 100644
index 000000000..e30ede9eb
--- /dev/null
+++ b/app/src/main/res/drawable/ic_play_vector.xml
@@ -0,0 +1,3 @@
+
+
+
diff --git a/app/src/main/res/layout/video_item_grid.xml b/app/src/main/res/layout/video_item_grid.xml
index 0cf042aae..c4aaea443 100644
--- a/app/src/main/res/layout/video_item_grid.xml
+++ b/app/src/main/res/layout/video_item_grid.xml
@@ -12,16 +12,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
-
-
-
+ android:layout_marginTop="@dimen/small_margin"
+ android:layout_marginLeft="@dimen/small_margin"
+ android:background="@drawable/darkened_automatic_circle_background" >
+
+
+
+
+
+
Date: Tue, 19 Dec 2023 17:24:53 +0100
Subject: [PATCH 3/4] align play icon and video duration text
---
app/src/main/res/layout/video_item_grid.xml | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/app/src/main/res/layout/video_item_grid.xml b/app/src/main/res/layout/video_item_grid.xml
index c4aaea443..1613377b5 100644
--- a/app/src/main/res/layout/video_item_grid.xml
+++ b/app/src/main/res/layout/video_item_grid.xml
@@ -29,7 +29,7 @@
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/play_icon_holder"
android:layout_width="wrap_content"
- android:layout_height="wrap_content"
+ android:layout_height="@dimen/selection_check_size"
android:layout_marginTop="@dimen/small_margin"
android:layout_marginLeft="@dimen/small_margin"
android:background="@drawable/darkened_automatic_circle_background" >
@@ -46,14 +46,12 @@
Date: Thu, 21 Dec 2023 17:46:04 +0100
Subject: [PATCH 4/4] fix review findings
---
.../drawable/darkened_automatic_circle_background.xml | 2 +-
app/src/main/res/layout/video_item_grid.xml | 10 ++++------
2 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/app/src/main/res/drawable/darkened_automatic_circle_background.xml b/app/src/main/res/drawable/darkened_automatic_circle_background.xml
index ea41f18df..a28fbcb29 100644
--- a/app/src/main/res/drawable/darkened_automatic_circle_background.xml
+++ b/app/src/main/res/drawable/darkened_automatic_circle_background.xml
@@ -1,5 +1,5 @@
-
+
diff --git a/app/src/main/res/layout/video_item_grid.xml b/app/src/main/res/layout/video_item_grid.xml
index 1613377b5..b2d31ea92 100644
--- a/app/src/main/res/layout/video_item_grid.xml
+++ b/app/src/main/res/layout/video_item_grid.xml
@@ -25,11 +25,12 @@
android:src="@drawable/ic_star_vector"
android:visibility="gone" />
-
@@ -47,14 +48,11 @@
android:id="@+id/video_duration"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:layout_marginRight="10dp"
+ android:layout_marginEnd="10dp"
android:layout_toEndOf="@id/play_portrait_outline"
- android:paddingBottom="2dp"
android:ellipsize="end"
android:gravity="center"
android:maxLines="1"
- android:shadowColor="@color/md_grey_black_dark"
- android:shadowRadius="6"
android:textColor="@android:color/white"
android:textSize="@dimen/normal_text_size"
android:visibility="gone"