Fix video indicator colors in list view

This commit is contained in:
Naveen Singh 2024-09-09 14:41:01 +05:30
parent 22b0cdfd2b
commit e49a466ff5
No known key found for this signature in database
GPG key ID: 35F7D64346B28ED7
3 changed files with 30 additions and 11 deletions

View file

@ -619,7 +619,13 @@ class MediaAdapter(
playPortraitOutline?.beVisibleIf(medium.isVideo() || medium.isPortrait())
if (medium.isVideo()) {
playPortraitOutline?.setImageResource(org.fossify.commons.R.drawable.ic_play_vector)
playPortraitOutline?.setImageResource(
if (isListViewType) {
org.fossify.commons.R.drawable.ic_play_outline_vector
} else {
org.fossify.commons.R.drawable.ic_play_vector
}
)
playPortraitOutline?.beVisible()
} else if (medium.isPortrait()) {
playPortraitOutline?.setImageResource(R.drawable.ic_portrait_photo_vector)
@ -648,6 +654,9 @@ class MediaAdapter(
videoDuration?.text = medium.videoDuration.getFormattedDuration()
}
videoDuration?.beVisibleIf(showVideoDuration)
if (isListViewType) {
videoDuration?.setTextColor(textColor)
}
mediumCheck.beVisibleIf(isSelected)
if (isSelected) {

View file

@ -10,7 +10,8 @@
<org.fossify.commons.views.MySquareImageView
android:id="@+id/medium_thumbnail"
android:layout_width="match_parent"
android:layout_height="match_parent" />
android:layout_height="match_parent"
tools:src="@mipmap/ic_launcher" />
<ImageView
android:id="@+id/favorite"
@ -23,7 +24,8 @@
android:gravity="end"
android:padding="@dimen/small_margin"
android:src="@drawable/ic_star_vector"
android:visibility="gone" />
android:visibility="gone"
tools:visibility="visible" />
<RelativeLayout
android:id="@+id/play_icon_holder"
@ -42,7 +44,9 @@
android:layout_alignParentStart="true"
android:layout_alignParentTop="true"
android:layout_margin="0dp"
android:visibility="gone" />
android:visibility="gone"
tools:src="@drawable/ic_play_vector"
tools:visibility="visible" />
<TextView
android:id="@+id/video_duration"
@ -56,7 +60,8 @@
android:textColor="@android:color/white"
android:textSize="@dimen/normal_text_size"
android:visibility="gone"
tools:text="02:34" />
tools:text="02:34"
tools:visibility="visible" />
</RelativeLayout>
@ -72,7 +77,8 @@
android:contentDescription="@null"
android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_check_vector"
android:visibility="gone" />
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/medium_name"

View file

@ -15,7 +15,8 @@
<org.fossify.commons.views.MySquareImageView
android:id="@+id/medium_thumbnail"
android:layout_width="@dimen/list_view_folder_thumbnail_size"
android:layout_height="@dimen/list_view_folder_thumbnail_size" />
android:layout_height="@dimen/list_view_folder_thumbnail_size"
tools:src="@mipmap/ic_launcher" />
<ImageView
android:id="@+id/favorite"
@ -28,7 +29,8 @@
android:gravity="end"
android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_star_vector"
android:visibility="gone" />
android:visibility="gone"
tools:visibility="visible" />
<ImageView
android:id="@+id/medium_check"
@ -42,7 +44,8 @@
android:contentDescription="@null"
android:padding="@dimen/tiny_margin"
android:src="@drawable/ic_check_vector"
android:visibility="gone" />
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/medium_name"
@ -67,9 +70,10 @@
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_marginEnd="@dimen/small_margin"
android:paddingBottom="6dp"
android:paddingBottom="@dimen/small_margin"
android:src="@drawable/ic_play_outline_vector"
android:visibility="gone" />
android:visibility="gone"
tools:visibility="visible" />
<TextView
android:id="@+id/video_duration"