Revert "Revert "Leanback Support: Added support for rendering media items in a playlist""
This reverts commit 5d65f5e507e1c11e65c1c29728545821d9726f73.
Change-Id: Iada2af5185018d203ee5edc8a0c0efc68e5934bd
diff --git a/v17/leanback/res/values/styles.xml b/v17/leanback/res/values/styles.xml
index f95a857..498c408 100644
--- a/v17/leanback/res/values/styles.xml
+++ b/v17/leanback/res/values/styles.xml
@@ -285,6 +285,95 @@
<item name="android:maxLines">4</item>
</style>
+
+ <!-- Styles for playback control, playlist header, and playlist content in a default media player layout. -->
+ <style name="Widget.Leanback.PlaybackRow">
+ <item name="android:layout_marginStart">?attr/playbackPaddingStart</item>
+ <item name="android:layout_marginEnd">?attr/playbackPaddingEnd</item>
+ <item name="android:clipChildren">false</item>
+ <item name="android:clipToPadding">false</item>
+ <item name="android:foreground">@null</item>
+ <item name="android:background">?attr/defaultBrandColor</item>
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">48dp</item>
+ </style>
+
+ <style name="Widget.Leanback.PlaybackMediaItemStyle" parent="Widget.Leanback.PlaybackRow">
+ <item name="android:focusable">true</item>
+ <item name="android:focusableInTouchMode">true</item>
+ <item name="android:foreground">?android:attr/selectableItemBackground</item>
+ </style>
+
+ <style name="Widget.Leanback.PlaybackMediaListHeaderStyle"
+ parent="Widget.Leanback.PlaybackRow">
+ <item name="android:focusable">false</item>
+ <item name="android:focusableInTouchMode">false</item>
+ </style>
+
+
+ <style name="TextAppearance.Leanback.PlaybackMediaListHeaderTitle">
+ <item name="android:textColor">#80EEEEEE</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:fontFamily">sans-serif-regular</item>
+ </style>
+
+ <style name="Widget.Leanback.PlaybackMediaListHeaderTitleStyle">
+ <item name="android:layout_width">match_parent</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:layout_alignParentStart">true</item>
+ <item name="android:layout_alignParentTop">true</item>
+ <item name="android:gravity">center_vertical</item>"
+ <item name="android:paddingLeft">32dp</item>
+ <item name="android:textAppearance">@style/TextAppearance.Leanback.PlaybackMediaListHeaderTitle</item>
+ </style>
+
+ <style name="TextAppearance.Leanback.PlaybackMediaItemTrackNumber">
+ <item name="android:textColor">#FFFFFF</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:fontFamily">sans-serif-regular</item>
+ </style>
+
+ <style name="Widget.Leanback.PlaybackMediaItemTrackNumberStyle">
+ <item name="android:layout_width">56dp</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:layout_marginLeft">32dp</item>
+ <item name="android:gravity">center_vertical</item>"
+ <item name="android:textAppearance">@style/TextAppearance.Leanback.PlaybackMediaItemTrackNumber</item>
+ </style>
+
+ <style name="TextAppearance.Leanback.PlaybackMediaItemTrackName">
+ <item name="android:textColor">#FFFFFF</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:fontFamily">sans-serif-regular</item>
+ </style>
+
+ <style name="Widget.Leanback.PlaybackMediaItemTrackNameStyle">
+ <item name="android:layout_width">wrap_content</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:layout_alignParentTop">true</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:gravity">center_vertical</item>"
+ <item name="android:textAppearance">@style/TextAppearance.Leanback.PlaybackMediaItemTrackName</item>
+ </style>
+
+ <style name="TextAppearance.Leanback.PlaybackMediaItemTrackDuration">
+ <item name="android:textColor">#80FFFFFF</item>
+ <item name="android:textSize">18sp</item>
+ <item name="android:fontFamily">sans-serif-regular</item>
+ </style>
+
+ <style name="Widget.Leanback.PlaybackMediaItemTrackDurationStyle">
+ <item name="android:layout_width">66dp</item>
+ <item name="android:layout_height">match_parent</item>
+ <item name="android:layout_alignParentEnd">true</item>
+ <item name="android:layout_alignParentTop">true</item>
+ <item name="android:layout_marginRight">32dp</item>
+ <item name="android:singleLine">true</item>
+ <item name="android:gravity">center_vertical|right</item>
+ <item name="android:textAppearance">@style/TextAppearance.Leanback.PlaybackMediaItemTrackDuration</item>
+ </style>
+
+
<style name="Widget.Leanback.DetailsDescriptionTitleStyle">
<item name="android:textAlignment">viewStart</item>
<item name="android:textAppearance">@style/TextAppearance.Leanback.DetailsDescriptionTitle</item>