Merge pull request #16 from gmasil/visibility-of-video-duration-in-thumbnail
increase visibility of video duration in thumbnails
This commit is contained in:
commit
83730c0678
4 changed files with 41 additions and 26 deletions
|
@ -619,7 +619,7 @@ class MediaAdapter(
|
||||||
|
|
||||||
playPortraitOutline?.beVisibleIf(medium.isVideo() || medium.isPortrait())
|
playPortraitOutline?.beVisibleIf(medium.isVideo() || medium.isPortrait())
|
||||||
if (medium.isVideo()) {
|
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()
|
playPortraitOutline?.beVisible()
|
||||||
} else if (medium.isPortrait()) {
|
} else if (medium.isPortrait()) {
|
||||||
playPortraitOutline?.setImageResource(R.drawable.ic_portrait_photo_vector)
|
playPortraitOutline?.setImageResource(R.drawable.ic_portrait_photo_vector)
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
|
||||||
|
<corners android:radius="@dimen/selection_check_size"/>
|
||||||
|
<solid android:color="@color/hint_black"/>
|
||||||
|
</shape>
|
3
app/src/main/res/drawable/ic_play_vector.xml
Normal file
3
app/src/main/res/drawable/ic_play_vector.xml
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="24dp" android:height="24dp" android:viewportWidth="24" android:viewportHeight="24">
|
||||||
|
<path android:fillColor="#FFFFFF" android:pathData="M16.247 11.424l-5.61-4.079c-0.206-0.149-0.48-0.171-0.705-0.055-0.228 0.115-0.37 0.348-0.37 0.601v8.154c0 0.255 0.142 0.488 0.37 0.603 0.096 0.049 0.201 0.073 0.307 0.073 0.139 0 0.279-0.044 0.398-0.131l5.61-4.075c0.177-0.13 0.28-0.332 0.28-0.546 0.001-0.217-0.105-0.418-0.28-0.545z"/>
|
||||||
|
</vector>
|
|
@ -12,16 +12,6 @@
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent" />
|
android:layout_height="match_parent" />
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/play_portrait_outline"
|
|
||||||
android:layout_width="@dimen/selection_check_size"
|
|
||||||
android:layout_height="@dimen/selection_check_size"
|
|
||||||
android:layout_alignParentStart="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_margin="@dimen/small_margin"
|
|
||||||
android:src="@drawable/ic_play_outline_vector"
|
|
||||||
android:visibility="gone" />
|
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/favorite"
|
android:id="@+id/favorite"
|
||||||
android:layout_width="@dimen/selection_check_size"
|
android:layout_width="@dimen/selection_check_size"
|
||||||
|
@ -35,23 +25,40 @@
|
||||||
android:src="@drawable/ic_star_vector"
|
android:src="@drawable/ic_star_vector"
|
||||||
android:visibility="gone" />
|
android:visibility="gone" />
|
||||||
|
|
||||||
<TextView
|
<RelativeLayout
|
||||||
android:id="@+id/video_duration"
|
android:id="@+id/play_icon_holder"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="@dimen/selection_check_size"
|
||||||
android:layout_alignTop="@+id/play_portrait_outline"
|
android:layout_alignParentStart="true"
|
||||||
android:layout_alignBottom="@+id/play_portrait_outline"
|
android:layout_alignParentTop="true"
|
||||||
android:layout_marginTop="@dimen/small_margin"
|
android:layout_marginTop="@dimen/small_margin"
|
||||||
android:layout_toEndOf="@id/play_portrait_outline"
|
android:layout_marginLeft="@dimen/small_margin"
|
||||||
android:ellipsize="end"
|
android:background="@drawable/darkened_automatic_circle_background" >
|
||||||
android:gravity="end"
|
|
||||||
android:maxLines="1"
|
<ImageView
|
||||||
android:shadowColor="@color/md_grey_black_dark"
|
android:id="@+id/play_portrait_outline"
|
||||||
android:shadowRadius="6"
|
android:layout_width="@dimen/selection_check_size"
|
||||||
android:textColor="@android:color/white"
|
android:layout_height="@dimen/selection_check_size"
|
||||||
android:textSize="@dimen/normal_text_size"
|
android:layout_alignParentStart="true"
|
||||||
android:visibility="gone"
|
android:layout_alignParentTop="true"
|
||||||
tools:text="02:34" />
|
android:layout_margin="0dp"
|
||||||
|
android:visibility="gone" />
|
||||||
|
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/video_duration"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="match_parent"
|
||||||
|
android:layout_marginEnd="10dp"
|
||||||
|
android:layout_toEndOf="@id/play_portrait_outline"
|
||||||
|
android:ellipsize="end"
|
||||||
|
android:gravity="center"
|
||||||
|
android:maxLines="1"
|
||||||
|
android:textColor="@android:color/white"
|
||||||
|
android:textSize="@dimen/normal_text_size"
|
||||||
|
android:visibility="gone"
|
||||||
|
tools:text="02:34" />
|
||||||
|
|
||||||
|
</RelativeLayout>
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/medium_check"
|
android:id="@+id/medium_check"
|
||||||
|
|
Loading…
Reference in a new issue