[Android] TV: Change background & cards content color
Geoffrey Métais
git at videolan.org
Thu Nov 24 15:01:05 CET 2016
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Thu Nov 24 14:47:34 2016 +0100| [985fdf5d86ce8527beafb332fa2ce6ebacc3978f] | committer: Geoffrey Métais
TV: Change background & cards content color
> https://code.videolan.org/videolan/vlc-android/commit/985fdf5d86ce8527beafb332fa2ce6ebacc3978f
---
vlc-android/res/layout/tv_main.xml | 2 +-
vlc-android/res/layout/tv_vertical_grid.xml | 2 +-
vlc-android/res/values/colors.xml | 4 ++++
vlc-android/res/values/styles.xml | 9 +++++++--
vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java | 1 -
5 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/vlc-android/res/layout/tv_main.xml b/vlc-android/res/layout/tv_main.xml
index 6119131..b6377e2 100644
--- a/vlc-android/res/layout/tv_main.xml
+++ b/vlc-android/res/layout/tv_main.xml
@@ -2,7 +2,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/grey850">
+ android:background="@color/tv_bg">
<fragment
android:name="android.support.v17.leanback.app.BrowseFragment"
android:id="@+id/browse_fragment"
diff --git a/vlc-android/res/layout/tv_vertical_grid.xml b/vlc-android/res/layout/tv_vertical_grid.xml
index 0072925..76ab6e6 100644
--- a/vlc-android/res/layout/tv_vertical_grid.xml
+++ b/vlc-android/res/layout/tv_vertical_grid.xml
@@ -1,7 +1,7 @@
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
- android:background="@color/grey850">
+ android:background="@color/tv_bg">
<FrameLayout
android:id="@+id/tv_fragment_placeholder"
android:layout_width="match_parent"
diff --git a/vlc-android/res/values/colors.xml b/vlc-android/res/values/colors.xml
index 5815144..19e3369 100644
--- a/vlc-android/res/values/colors.xml
+++ b/vlc-android/res/values/colors.xml
@@ -42,4 +42,8 @@
<color name="blacktransparent">#b4000000</color>
<color name="whitetransparent">#dcffffff</color>
<color name="transparent">#00000000</color>
+
+
+ <color name="tv_bg">#235f69</color>
+ <color name="tv_card_content">#0a6e96</color>
</resources>
\ No newline at end of file
diff --git a/vlc-android/res/values/styles.xml b/vlc-android/res/values/styles.xml
index 1580b21..686c8a1 100644
--- a/vlc-android/res/values/styles.xml
+++ b/vlc-android/res/values/styles.xml
@@ -172,17 +172,22 @@
<item name="ic_subtitledelay">@drawable/ic_subtitledelay_w</item>
</style>
<style name="Theme.VLC.TV" parent="Theme.Leanback">
- <item name="imageCardViewStyle">@style/VLCardView</item>
- <item name="imageCardViewTitleStyle">@style/VLCardViewTitleStyle</item>
+ <item name="imageCardViewInfoAreaStyle">@style/VLCardViewInfoStyle</item>
+ <item name="imageCardViewTitleStyle">@style/VLCardViewTitleStyle</item>
+ <item name="imageCardViewStyle">@style/VLCardView</item>
</style>
<style name="VLCardView" parent="Widget.Leanback.ImageCardViewStyle">
<item name="cardType">infoUnderWithExtra</item>
<item name="infoVisibility">always</item>
+
</style>
<style name="VLCardViewTitleStyle" parent="Widget.Leanback.ImageCardView.TitleStyle">
<item name="android:maxLines">2</item>
<item name="android:ellipsize">middle</item>
</style>
+ <style name="VLCardViewInfoStyle" parent="Widget.Leanback.ImageCardView.InfoAreaStyle">
+ <item name="android:background">@color/tv_card_content</item>
+ </style>
<style name="Theme.VLC.Leanback.Preferences" parent="Theme.Leanback">
<item name="preferenceTheme">@style/PreferenceThemeOverlay</item>
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
index 7183699..3c8929c 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/MainTvActivity.java
@@ -152,7 +152,6 @@ public class MainTvActivity extends BaseTvActivity implements OnItemViewSelected
}
mRootContainer = mBrowseFragment.getView();
- mRootContainer.setBackgroundColor(ContextCompat.getColor(this, R.color.grey850));
mBrowseFragment.setBrandColor(ContextCompat.getColor(this, R.color.orange800));
}
More information about the Android
mailing list