[Android] Fix crash when inflating the medialib scan view + player color
Nicolas Pomepuy
git at videolan.org
Mon May 11 15:57:40 CEST 2020
vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon May 11 12:16:48 2020 +0200| [274a9f0248821087305127dc840be4b1eb7be165] | committer: Geoffrey Métais
Fix crash when inflating the medialib scan view + player color
> https://code.videolan.org/videolan/vlc-android/commit/274a9f0248821087305127dc840be4b1eb7be165
---
.../drawable/bottom_navigation_background_dark.xml | 2 +-
.../src/main/res/drawable/progress_mini_player.xml | 2 +-
.../res/drawable/progress_mini_player_black.xml | 40 ++++++++++++++++++++++
application/vlc-android/res/values/styles.xml | 2 +-
4 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/application/resources/src/main/res/drawable/bottom_navigation_background_dark.xml b/application/resources/src/main/res/drawable/bottom_navigation_background_dark.xml
index 462e71ce9..96a76009f 100644
--- a/application/resources/src/main/res/drawable/bottom_navigation_background_dark.xml
+++ b/application/resources/src/main/res/drawable/bottom_navigation_background_dark.xml
@@ -25,7 +25,7 @@
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
- <solid android:color="@color/grey300" />
+ <solid android:color="@color/grey800" />
</shape>
</item>
<item android:top="1dp">
diff --git a/application/resources/src/main/res/drawable/progress_mini_player.xml b/application/resources/src/main/res/drawable/progress_mini_player.xml
index 052600f57..146eedddd 100644
--- a/application/resources/src/main/res/drawable/progress_mini_player.xml
+++ b/application/resources/src/main/res/drawable/progress_mini_player.xml
@@ -2,7 +2,7 @@
<item android:id="@android:id/background">
<shape>
- <solid android:color="?attr/background_default_darker" />
+ <solid android:color="@color/grey200" />
</shape>
</item>
<item android:id="@android:id/progress">
diff --git a/application/resources/src/main/res/drawable/progress_mini_player_black.xml b/application/resources/src/main/res/drawable/progress_mini_player_black.xml
new file mode 100644
index 000000000..74d1ecc1a
--- /dev/null
+++ b/application/resources/src/main/res/drawable/progress_mini_player_black.xml
@@ -0,0 +1,40 @@
+<!--
+ ~ *************************************************************************
+ ~ progress_mini_player_black.xml
+ ~ **************************************************************************
+ ~ Copyright © 2020 VLC authors and VideoLAN
+ ~ Author: Nicolas POMEPUY
+ ~ This program is free software; you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation; either version 2 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program; if not, write to the Free Software
+ ~ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ ~ ***************************************************************************
+ ~
+ ~
+ -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+
+ <item android:id="@android:id/background">
+ <shape>
+ <solid android:color="@color/grey800" />
+ </shape>
+ </item>
+ <item android:id="@android:id/progress">
+ <clip>
+ <shape>
+ <solid android:color="@color/orange500" />
+ </shape>
+ </clip>
+ </item>
+
+</layer-list>
\ No newline at end of file
diff --git a/application/vlc-android/res/values/styles.xml b/application/vlc-android/res/values/styles.xml
index 25a0b9e4f..98a132f82 100644
--- a/application/vlc-android/res/values/styles.xml
+++ b/application/vlc-android/res/values/styles.xml
@@ -208,7 +208,7 @@
<item name="ic_trash">@drawable/ic_trash_w</item>
<item name="ic_reset">@drawable/ic_reset_w</item>
<item name="gridview_progressbar">@drawable/gridview_progressbar_w</item>
- <item name="progress_mini_player">@drawable/progress_mini_player</item>
+ <item name="progress_mini_player">@drawable/progress_mini_player_black</item>
<item name="advanced_options_style">@style/Theme.MaterialComponents.Dialog</item>
<item name="advanced_options_bg">@drawable/advanced_options_background_dark</item>
<item name="ic_playasaudio_off">@drawable/ic_playasaudio_off_w</item>
More information about the Android
mailing list