[Android] Header background is no more a gradient
Nicolas Pomepuy
git at videolan.org
Thu Apr 16 15:43:45 CEST 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Thu Apr 9 12:12:06 2020 +0200| [3c034478a45bd8a93c9917dc63281dc2b9891422] | committer: Nicolas Pomepuy
Header background is no more a gradient
> https://code.videolan.org/videolan/vlc-android/commit/3c034478a45bd8a93c9917dc63281dc2b9891422
---
.../resources/src/main/res/drawable/gradient_background_dark.xml | 8 --------
.../src/main/res/drawable/gradient_background_light.xml | 9 ---------
application/resources/src/main/res/values/attrs.xml | 2 +-
application/vlc-android/res/layout/recycler_section_header.xml | 2 +-
.../vlc-android/res/layout/recycler_section_header_tv.xml | 2 +-
application/vlc-android/res/values/styles.xml | 6 +++---
6 files changed, 6 insertions(+), 23 deletions(-)
diff --git a/application/resources/src/main/res/drawable/gradient_background_dark.xml b/application/resources/src/main/res/drawable/gradient_background_dark.xml
deleted file mode 100644
index 19101d019..000000000
--- a/application/resources/src/main/res/drawable/gradient_background_dark.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <gradient
- android:startColor="@color/grey900"
- android:endColor="@color/grey900transparent_dd"
- android:angle="270"
- android:centerY="0.75" />
-</shape>
\ No newline at end of file
diff --git a/application/resources/src/main/res/drawable/gradient_background_light.xml b/application/resources/src/main/res/drawable/gradient_background_light.xml
deleted file mode 100644
index 3546e3c07..000000000
--- a/application/resources/src/main/res/drawable/gradient_background_light.xml
+++ /dev/null
@@ -1,9 +0,0 @@
-<shape xmlns:android="http://schemas.android.com/apk/res/android"
- android:shape="rectangle">
- <gradient
- android:startColor="@color/white"
- android:centerColor="@color/whitetransparent_ea"
- android:endColor="@color/whitetransparent_b9"
- android:angle="270"
- android:centerY="0.75"/>
-</shape>
\ No newline at end of file
diff --git a/application/resources/src/main/res/values/attrs.xml b/application/resources/src/main/res/values/attrs.xml
index 060a0b475..d70d39129 100644
--- a/application/resources/src/main/res/values/attrs.xml
+++ b/application/resources/src/main/res/values/attrs.xml
@@ -26,7 +26,7 @@
<attr name="item_footer" format="reference|color" />
<attr name="background_default" format="reference|color" />
- <attr name="background_default_gradient" format="reference|color" />
+ <attr name="header_background" format="reference|color" />
<attr name="background_default_darker" format="reference|color" />
<attr name="background_actionbar" format="reference|color" />
<attr name="background_menu_divider" format="reference|color" />
diff --git a/application/vlc-android/res/layout/recycler_section_header.xml b/application/vlc-android/res/layout/recycler_section_header.xml
index 0a5b3da2d..fdccc1336 100644
--- a/application/vlc-android/res/layout/recycler_section_header.xml
+++ b/application/vlc-android/res/layout/recycler_section_header.xml
@@ -3,7 +3,7 @@
android:id="@+id/section_header"
android:layout_width="match_parent"
android:layout_height="@dimen/recycler_section_header_height"
- android:background="?attr/background_default_gradient"
+ android:background="?attr/header_background"
android:paddingStart="16dp"
android:paddingEnd="28dp"
android:singleLine="true"
diff --git a/application/vlc-android/res/layout/recycler_section_header_tv.xml b/application/vlc-android/res/layout/recycler_section_header_tv.xml
index 98832fcce..33a3d50b8 100644
--- a/application/vlc-android/res/layout/recycler_section_header_tv.xml
+++ b/application/vlc-android/res/layout/recycler_section_header_tv.xml
@@ -7,7 +7,7 @@
android:id="@+id/section_header"
android:layout_width="wrap_content"
android:layout_height="match_parent"
- android:background="?attr/background_default_gradient"
+ android:background="?attr/header_background"
android:paddingStart="@dimen/tv_overscan_horizontal"
android:paddingTop="@dimen/audio_item_header_padding"
android:paddingEnd="28dp"
diff --git a/application/vlc-android/res/values/styles.xml b/application/vlc-android/res/values/styles.xml
index f61dd7a39..0764f4249 100644
--- a/application/vlc-android/res/values/styles.xml
+++ b/application/vlc-android/res/values/styles.xml
@@ -42,7 +42,7 @@
<item name="item_footer">@color/grey300</item>
<item name="background_default">@color/white</item>
<item name="progress_indeterminate_tint">@color/white</item>
- <item name="background_default_gradient">@drawable/gradient_background_light</item>
+ <item name="header_background">@color/whitetransparent_ea</item>
<item name="background_default_darker">@color/grey200</item>
<item name="background_actionbar">@color/white</item>
<item name="background_menu_divider">@color/grey400</item>
@@ -165,7 +165,7 @@
<item name="windowActionModeOverlay">true</item>
<item name="actionModeBackground">@color/grey875</item>
<item name="background_default">@color/black</item>
- <item name="background_default_gradient">@drawable/gradient_background_dark</item>
+ <item name="header_background">@color/blacktransparent</item>
<item name="background_default_darker">@color/grey875</item>
<item name="background_actionbar">@color/black</item>
<item name="background_menu_divider">@color/grey700</item>
@@ -247,7 +247,7 @@
<item name="imageCardViewTitleStyle">@style/VLCardViewTitleStyle</item>
<item name="imageCardViewStyle">@style/VLCardView</item>
<item name="audio_player_background_tint">@color/grey900transparent</item>
- <item name="background_default_gradient">@drawable/gradient_background_tv</item>
+ <item name="header_background">@drawable/gradient_background_tv</item>
<item name="audio_browser_separator">@color/orange500</item>
<item name="player_icon_color">@color/white</item>
<item name="ariane_text_color">@color/simple_list_title_tv</item>
More information about the Android
mailing list