Commit 866646b1 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Geoffrey Métais

Add Albums and Playlists screens on TV

parent b7a679c9
<?xml version="1.0" encoding="UTF-8" standalone="no"?><!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" width="24" height="24" id="svg4682"
version="1.1" inkscape:version="0.92.4 (33fec40, 2019-01-16)"
sodipodi:docname="ic_tv_list_play.svg"
inkscape:export-filename="/home/corbax/Dev/android/Icons/Test 1/ic_play_normal.png"
inkscape:export-xdpi="90" inkscape:export-ydpi="90">
<defs id="defs4684" />
<sodipodi:namedview id="base" pagecolor="#ffffff" bordercolor="#666666" borderopacity="1.0"
inkscape:pageopacity="0.0" inkscape:pageshadow="2" inkscape:zoom="26.280704"
inkscape:cx="12.285765" inkscape:cy="9.5033488" inkscape:document-units="px"
inkscape:current-layer="layer1" showgrid="true" inkscape:window-width="1675"
inkscape:window-height="960" inkscape:window-x="1935" inkscape:window-y="271"
inkscape:window-maximized="0" fit-margin-top="4" fit-margin-left="4" fit-margin-right="4"
fit-margin-bottom="4" inkscape:snap-bbox="true" inkscape:bbox-paths="true"
inkscape:bbox-nodes="true" inkscape:snap-bbox-edge-midpoints="true"
inkscape:snap-bbox-midpoints="true" inkscape:object-paths="true"
inkscape:snap-intersection-paths="true" inkscape:snap-smooth-nodes="true"
inkscape:snap-midpoints="true" inkscape:snap-object-midpoints="true"
inkscape:snap-center="true">
<inkscape:grid type="xygrid" id="grid3002" originx="0" originy="0" />
</sodipodi:namedview>
<metadata id="metadata4687">
<rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g inkscape:label="Layer 1" inkscape:groupmode="layer" id="layer1"
transform="translate(0,-1028.3622)">
<path
style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;vector-effect:none;fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.59978354;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
d="m 7.9527705,1032.3636 c -0.4221151,0.025 -0.7513522,0.3754 -0.7514616,0.7984 v 14.398 c -7.704e-4,0.6218 0.6771795,1.0067 1.210775,0.6874 l 11.9983891,-7.2005 c 0.517625,-0.3108 0.517625,-1.0611 0,-1.3718 l -11.9983891,-7.199 c -0.138273,-0.082 -0.2983739,-0.1222 -0.4593134,-0.1125 z"
id="path7835-5" inkscape:connector-curvature="0" sodipodi:nodetypes="cccccccc" />
</g>
</svg>
package org.videolan.tools
import android.content.res.Resources
import android.view.View
import androidx.lifecycle.Lifecycle
import androidx.lifecycle.LifecycleObserver
......@@ -19,6 +20,7 @@ fun LifecycleOwner.createJob(cancelEvent: Lifecycle.Event = Lifecycle.Event.ON_D
}
})
}
private val lifecycleCoroutineScopes = mutableMapOf<Lifecycle, CoroutineScope>()
@ExperimentalCoroutinesApi
......@@ -30,7 +32,7 @@ val LifecycleOwner.coroutineScope: CoroutineScope
newScope
}
fun <T> List<T>.getposition(target: T) : Int {
fun <T> List<T>.getposition(target: T): Int {
for ((index, item) in withIndex()) if (item == target) return index
return -1
}
......@@ -47,4 +49,7 @@ fun View?.setVisibility(visibility: Int) {
fun View?.setVisible() = setVisibility(View.VISIBLE)
fun View?.setInvisible() = setVisibility(View.INVISIBLE)
fun View?.setGone() = setVisibility(View.GONE)
\ No newline at end of file
fun View?.setGone() = setVisibility(View.GONE)
val Int.dp: Int get() = (this / Resources.getSystem().displayMetrics.density).toInt()
val Int.px: Int get() = (this * Resources.getSystem().displayMetrics.density).toInt()
\ No newline at end of file
......@@ -575,6 +575,12 @@
android:exported="true"
android:screenOrientation="landscape"
android:theme="@style/Theme.VLC.TV" />
<activity
android:name=".gui.tv.details.MediaListActivity"
android:exported="true"
android:screenOrientation="landscape"
android:theme="@style/Theme.VLC.TV" />
<activity
android:name=".gui.tv.browser.TVActivity"
android:exported="true"
......@@ -607,7 +613,7 @@
<service
android:name=".RecommendationsService"
android:exported="false"></service>
android:exported="false" />
<receiver
android:name=".TvReceiver"
......@@ -655,4 +661,4 @@
</service>
</application>
</manifest>
</manifest>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/circle_white" />
<item android:state_selected="true" android:drawable="@drawable/circle_white" />
<item android:state_pressed="true" android:drawable="@drawable/circle_white" />
<item android:drawable="@drawable/empty" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="oval">
<solid android:color="@color/white_more_transparent"></solid>
</shape>
\ No newline at end of file
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<size
android:width="1px"
android:height="1px" />
<solid android:color="@color/tv_card_content_darker" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<shape />
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m4,4v2h14v-2zM4,8v2h14v-2zM4,12v2h7v-2zM16,12c-0.554,0 -1,0.446 -1,1v2h-2c-0.554,0 -1,0.446 -1,1 0,0.554 0.446,1 1,1h2v2c0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1v-2h2c0.554,0 1,-0.446 1,-1 0,-0.554 -0.446,-1 -1,-1h-2v-2c0,-0.554 -0.446,-1 -1,-1z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="0.1"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"
android:strokeLineCap="round" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m4.9883,3.9991c-0.5477,0.01 -0.9883,0.4523 -0.9883,1v8c0.0001,0.7986 0.8901,1.275 1.5547,0.8321l6,-4c0.5936,-0.3959 0.5936,-1.2682 0,-1.6641l-6,-4c-0.1676,-0.1118 -0.365,-0.1703 -0.5664,-0.168z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"
android:strokeLineCap="butt" />
<path
android:pathData="m11.959,13.0011c-0.5355,0.022 -0.9584,0.4621 -0.959,0.998v5.002c0.0005,0.7848 0.8635,1.2632 1.5293,0.8476l4,-2.5019c0.6261,-0.3917 0.6261,-1.3036 0,-1.6953l-4,-2.5c-0.1707,-0.1063 -0.3694,-0.1588 -0.5703,-0.1504z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="1.99951768"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"
android:strokeLineCap="butt" />
<path
android:pathData="m19,12.9999c-0.554,0 -1,0.446 -1,1v5c0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1v-5c0,-0.554 -0.446,-1 -1,-1z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="3.7416575"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"
android:strokeLineCap="butt" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m9,4c-0.5516,0 -0.9989,0.4467 -1,0.9981l-2,-0.01v2h12v-2l-2,0.01c-0.001,-0.5514 -0.4484,-0.9981 -1,-0.9981h-1,-4zM6.9997,8.0009 L7,18c0,1.108 0.892,2 2,2h6c1.108,0 2,-0.892 2,-2l-0.0003,-9.9991z"
android:strokeWidth="1"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m12,17a1,1 0,0 1,-0.707 -0.293l-6.9902,-6.9902 -0.01,-0.01a1,1 0,0 1,-0.293 -0.707,1 1,0 0,1 1,-1 1,1 0,0 1,0.707 0.293l6.293,6.2929 6.2832,-6.2832a1,1 0,0 1,0.7168 -0.3027,1 1,0 0,1 1,1 1,1 0,0 1,-0.293 0.707l-6.9902,6.9903A1,1 0,0 1,12 17Z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"
android:strokeLineCap="round" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m12,7a1,1 0,0 0,-0.707 0.293l-6.9902,6.9902 -0.01,0.01a1,1 0,0 0,-0.293 0.707,1 1,0 0,0 1,1 1,1 0,0 0,0.707 -0.293l6.293,-6.2929 6.2832,6.2832a1,1 0,0 0,0.7168 0.3027,1 1,0 0,0 1,-1 1,1 0,0 0,-0.293 -0.707l-6.9902,-6.9903A1,1 0,0 0,12 7Z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="2"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"
android:strokeLineCap="round" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m7.9528,4.0015c-0.4221,0.025 -0.7514,0.3754 -0.7515,0.7984v14.398c-0.0008,0.6218 0.6772,1.0067 1.2108,0.6874l11.9984,-7.2005c0.5176,-0.3108 0.5176,-1.0611 0,-1.3718l-11.9984,-7.199c-0.1383,-0.082 -0.2984,-0.1222 -0.4593,-0.1125z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="1.59978354"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="1"
android:strokeLineCap="butt" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="32dp"
android:height="32dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m7.9528,4.0015c-0.4221,0.025 -0.7514,0.3754 -0.7515,0.7984v14.398c-0.0008,0.6218 0.6772,1.0067 1.2108,0.6874l11.9984,-7.2005c0.5176,-0.3108 0.5176,-1.0611 0,-1.3718l-11.9984,-7.199c-0.1383,-0.082 -0.2984,-0.1222 -0.4593,-0.1125z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="1.59978354"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="evenOdd"
android:fillAlpha="1"
android:strokeLineCap="butt" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M4.9883,4.002C4.4414,4.012 4.0011,4.4531 4,5L4,13.002C4.0002,13.8006 4.8901,14.2768 5.5547,13.834L11.5547,9.832C12.1483,9.4361 12.1483,8.5639 11.5547,8.168L5.5547,4.168C5.3869,4.0569 5.1895,3.9991 4.9883,4.002zM16,12C15.446,12 15,12.446 15,13L15,15L13,15C12.446,15 12,15.446 12,16C12,16.554 12.446,17 13,17L15,17L15,19C15,19.554 15.446,20 16,20C16.554,20 17,19.554 17,19L17,17L19,17C19.554,17 20,16.554 20,16C20,15.446 19.554,15 19,15L17,15L17,13C17,12.446 16.554,12 16,12z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="10"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"
android:strokeLineCap="round" />
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="m4,4v2h14v-2zM4,8v2h14v-2zM4,12v2h7v-2zM14,13a1,1 0,0 0,-1 1,1 1,0 0,0 0.293,0.707l1.793,1.793 -1.793,1.793A1,1 0,0 0,13 19a1,1 0,0 0,1 1,1 1,0 0,0 0.707,-0.293l1.793,-1.7929 1.7832,1.7832A1,1 0,0 0,19 20a1,1 0,0 0,1 -1,1 1,0 0,0 -0.293,-0.707l-1.793,-1.793 1.7832,-1.7832A1,1 0,0 0,20 14a1,1 0,0 0,-1 -1,1 1,0 0,0 -0.707,0.293l-1.793,1.7929 -1.7832,-1.7832a1,1 0,0 0,-0.0098 -0.01A1,1 0,0 0,14 13Z"
android:strokeAlpha="1"
android:strokeLineJoin="round"
android:strokeWidth="0.1"
android:fillColor="#ffffff"
android:strokeColor="#00000000"
android:fillType="nonZero"
android:fillAlpha="1"
android:strokeLineCap="round" />
</vector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="@color/white_more_transparent" />
<corners
android:topRightRadius="24dp"
android:bottomRightRadius="24dp" />
</shape>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_focused="true" android:drawable="@drawable/rectangle_circle_right_white" />
<item android:state_selected="true" android:drawable="@drawable/rectangle_circle_right_white" />
<item android:state_pressed="true" android:drawable="@drawable/rectangle_circle_right_white" />
<item android:drawable="@drawable/empty" />
</selector>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="jelly_bean">
<data>
<import type="android.view.View" />
<import type="android.text.TextUtils" />
<import type="org.videolan.medialibrary.media.MediaLibraryItem" />
<variable
name="item"
type="MediaLibraryItem" />
<variable
name="cover"
type="android.graphics.drawable.BitmapDrawable" />
<variable
name="title"
type="String" />
<variable
name="subtitle"
type="String" />
<variable
name="totalTime"
type="String" />
<variable
name="imageWidth"
type="int" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="org.videolan.vlc.gui.tv.details.MediaListActivity"
tools:theme="@style/Theme.VLC.TV">
<FrameLayout
android:id="@+id/frameLayout"
android:layout_width="match_parent"
android:layout_height="150dp"
android:background="@color/tv_card_content_darker"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
</FrameLayout>
<ImageView
android:id="@+id/cover"
android:layout_width="0dp"
android:layout_height="90dp"
android:layout_marginStart="24dp"
android:layout_marginBottom="8dp"
android:background="@{cover}"
app:imageWidth="@{imageWidth}"
app:layout_constraintBottom_toBottomOf="@+id/frameLayout"
app:layout_constraintDimensionRatio="1"
app:layout_constraintStart_toStartOf="parent"
app:mediaWithWidth="@{item}"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/albumTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@{title}"
android:textColor="@color/white"
android:textSize="18sp"
app:layout_constraintStart_toEndOf="@+id/cover"
app:layout_constraintTop_toTopOf="@+id/cover"
tools:text="Symphony No. 1" />
<TextView
android:id="@+id/albumSubtitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@{subtitle}"
app:layout_constraintStart_toEndOf="@+id/cover"
app:layout_constraintTop_toBottomOf="@+id/albumTitle"
tools:text="Ludwig van Beethoven" />
<TextView
android:id="@+id/albumTotalTime"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:text="@{totalTime}"
app:layout_constraintStart_toEndOf="@+id/cover"
app:layout_constraintTop_toBottomOf="@+id/albumSubtitle"
tools:text="01:38:27" />
<androidx.constraintlayout.widget.Barrier
android:id="@+id/barrier2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:barrierDirection="end"
app:constraint_referenced_ids="albumSubtitle,albumTitle"
tools:layout_editor_absoluteX="960dp" />
<HorizontalScrollView
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="16dp"
android:layout_marginBottom="8dp"
app:layout_constraintBottom_toBottomOf="@+id/frameLayout"
app:layout_constraintEnd_toEndOf="@+id/media_list"
app:layout_constraintStart_toEndOf="@+id/barrier2">
<LinearLayout
style="?android:attr/buttonBarStyle"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="end"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/play"
android:layout_marginEnd="8dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_circle_white_selector"
android:padding="8dp"
android:text="@string/play"
app:srcCompat="@drawable/ic_tv_list_play" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/delete"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:background="@drawable/button_circle_white_selector"
android:padding="8dp"
android:text="@string/delete"
app:srcCompat="@drawable/ic_tv_list_delete" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/insert_next"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:background="@drawable/button_circle_white_selector"
android:padding="8dp"
android:text="@string/insert_next"
app:srcCompat="@drawable/ic_tv_list_playnext" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/append"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:background="@drawable/button_circle_white_selector"
android:padding="8dp"
android:text="@string/append"
app:srcCompat="@drawable/ic_tv_list_append" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/add_playlist"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/button_circle_white_selector"
android:padding="8dp"
android:text="@string/add_to_playlist"
app:srcCompat="@drawable/ic_tv_list_addtoplaylist" />
</LinearLayout>
</HorizontalScrollView>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/media_list"
android:layout_width="800dp"
android:layout_height="0dp"
android:clipToPadding="false"
android:paddingTop="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/frameLayout" />
<include layout="@layout/tv_time" />
</androidx.constraintlayout.widget.ConstraintLayout>
</layout>
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
tools:targetApi="jelly_bean">
<data>
<import type="android.view.View" />
<import type="org.videolan.medialibrary.Tools" />
<import type="android.text.TextUtils" />
<import type="org.videolan.medialibrary.media.MediaWrapper" />
<variable
name="item"
type="MediaWrapper" />
<variable
name="cover"
type="android.graphics.drawable.BitmapDrawable" />
<variable
name="holder"
type="org.videolan.vlc.gui.tv.details.MediaListAdapter.MediaListViewHolder" />
</data>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="48dp"
android:background="@color/tv_card_content_dark"
android:descendantFocusability="afterDescendants"
tools:context="org.videolan.vlc.gui.tv.details.MediaListActivity"
tools:theme="@style/Theme.VLC.TV">
<ImageView
android:id="@+id/cover"
android:layout_width="0dp"
android:layout_height="48dp"
android:background="@{cover}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="1"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:media="@{item}"
tools:srcCompat="@tools:sample/avatars" />
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/item_play"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0"
android:background="@color/blacktransparent"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintStart_toStartOf="@+id/item_selector"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_tv_list_play_big" />
<TextView
android:id="@+id/title"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@{item.title}"
android:textColor="@color/white"
android:textSize="16sp"
app:layout_constraintBottom_toTopOf="@+id/textView16"
app:layout_constraintEnd_toStartOf="@+id/textView17"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/item_play"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_chainStyle="packed"
tools:text="Symphony No. 1" />
<TextView
android:id="@+id/textView16"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:text="@{item.artist}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/textView17"
app:layout_constraintHorizontal_bias="0.5"
app:layout_constraintStart_toEndOf="@+id/item_play"
app:layout_constraintTop_toBottomOf="@+id/title"
tools:text="Ludwig van Beethoven" />
<TextView
android:id="@+id/textView17"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:text="@{Tools.millisToString(item.length)}"
android:textAlignment="textEnd"
android:textColor="@color/white"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="@+id/item_selector"
app:layout_constraintTop_toTopOf="parent"
tools:text="1:05:56" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/item_move_up"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:alpha="0"
android:focusableInTouchMode="true"
tools:alpha="1"
android:background="@drawable/button_circle_white_selector"
android:onClick="@{holder::onClickMoveUp}"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/item_move_down"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_tv_list_moveup" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/item_move_down"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:alpha="0"
android:background="@drawable/button_circle_white_selector"
android:focusableInTouchMode="true"
android:onClick="@{holder::onClickMoveDown}"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/item_insert_next"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_tv_list_movedown"
tools:alpha="1" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/item_remove"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0"
android:background="@drawable/button_circle_white_selector"
android:focusableInTouchMode="true"
android:onClick="@{holder::onClickRemove}"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_tv_list_removefromplaylist"
tools:alpha="1" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/item_insert_next"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:alpha="0"
android:background="@drawable/button_circle_white_selector"
android:focusableInTouchMode="true"
android:padding="8dp"
android:onClick="@{holder::onClickPlayNext}"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/item_append"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_tv_list_playnext"
tools:alpha="1" />
<androidx.appcompat.widget.AppCompatImageButton
android:id="@+id/item_append"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:focusableInTouchMode="true"
android:alpha="0"
tools:alpha="1"
android:background="@drawable/button_circle_white_selector"
android:onClick="@{holder::onClickAppend}"
android:padding="8dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toStartOf="@+id/item_add_playlist"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_tv_list_append" />
<androidx.appcompat.widget.AppCompatImageButton