[Android] New onboarding color

Nicolas Pomepuy git at videolan.org
Mon Jul 5 11:12:29 UTC 2021


vlc-android | branch: master | Nicolas Pomepuy <nicolas at videolabs.io> | Mon Jun 21 07:21:36 2021 +0200| [772eed8babb5821278da8bb55085d368fc98ed3c] | committer: Nicolas Pomepuy

New onboarding color

> https://code.videolan.org/videolan/vlc-android/commit/772eed8babb5821278da8bb55085d368fc98ed3c
---

 .../resources/src/main/res/drawable/theme_selection_rounded.xml    | 2 +-
 application/resources/src/main/res/values/colors.xml               | 5 +----
 application/vlc-android/res/values-v21/styles.xml                  | 5 +++++
 application/vlc-android/res/values-v23/styles.xml                  | 5 +++++
 application/vlc-android/res/values-v27/styles.xml                  | 7 +++++++
 application/vlc-android/res/values/styles.xml                      | 3 ++-
 .../src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt      | 6 ------
 7 files changed, 21 insertions(+), 12 deletions(-)

diff --git a/application/resources/src/main/res/drawable/theme_selection_rounded.xml b/application/resources/src/main/res/drawable/theme_selection_rounded.xml
index 60938fe3d..4e9bb2757 100644
--- a/application/resources/src/main/res/drawable/theme_selection_rounded.xml
+++ b/application/resources/src/main/res/drawable/theme_selection_rounded.xml
@@ -1,7 +1,7 @@
 <?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_selection_transparent"></solid>
+    <solid android:color="@color/white_transparent_20"></solid>
     <corners android:radius="8dp"></corners>
 
 </shape>
\ No newline at end of file
diff --git a/application/resources/src/main/res/values/colors.xml b/application/resources/src/main/res/values/colors.xml
index c223c86ff..b8233e10e 100644
--- a/application/resources/src/main/res/values/colors.xml
+++ b/application/resources/src/main/res/values/colors.xml
@@ -104,8 +104,6 @@
     <color name="orange_800_transparent_20">#33ff610a</color>
     <color name="orange_500_transparent_20">#33FF8800</color>
 
-    <color name="white_selection_transparent">#44ffffff</color>
-
     <color name="tv_bg">#3e6c80</color>
     <color name="tv_card_content">#3e6c80</color>
     <color name="tv_card_content_dark">#386173</color>
@@ -116,8 +114,7 @@
     <!--test with onboarding colors-->
     <!--<color name="tv_bg">#1c313a</color>-->
     <!--<color name="tv_card_content">#396375</color>-->
-    <color name="onboarding_grey_dark">#1c313a</color>
-    <color name="onboarding_grey">#455a64</color>
+    <color name="onboarding_grey">#011422</color>
     <color name="material_blue">#2196f3</color>
     <color name="material_pink">#e91e63</color>
 </resources>
\ No newline at end of file
diff --git a/application/vlc-android/res/values-v21/styles.xml b/application/vlc-android/res/values-v21/styles.xml
index bd849955f..e76075460 100644
--- a/application/vlc-android/res/values-v21/styles.xml
+++ b/application/vlc-android/res/values-v21/styles.xml
@@ -21,4 +21,9 @@
         <item name="android:windowDrawsSystemBarBackgrounds">true</item>
         <item name="android:statusBarColor">@color/black</item>
     </style>
+
+    <style name="Theme.VLC.Onboarding" parent="Theme.VLC.Onboarding.7">
+        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+        <item name="android:statusBarColor">@color/onboarding_grey</item>
+    </style>
 </resources>
diff --git a/application/vlc-android/res/values-v23/styles.xml b/application/vlc-android/res/values-v23/styles.xml
index 73a06c985..fc8ab9ddc 100644
--- a/application/vlc-android/res/values-v23/styles.xml
+++ b/application/vlc-android/res/values-v23/styles.xml
@@ -35,4 +35,9 @@
         <item name="android:statusBarColor">@color/black</item>
         <item name="android:windowLightStatusBar">false</item>
     </style>
+    <style name="Theme.VLC.Onboarding" parent="Theme.VLC.Onboarding.7">
+        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+        <item name="android:statusBarColor">@color/onboarding_grey</item>
+        <item name="android:windowLightStatusBar">false</item>
+    </style>
 </resources>
\ No newline at end of file
diff --git a/application/vlc-android/res/values-v27/styles.xml b/application/vlc-android/res/values-v27/styles.xml
index 1dcf94474..13937720f 100644
--- a/application/vlc-android/res/values-v27/styles.xml
+++ b/application/vlc-android/res/values-v27/styles.xml
@@ -39,6 +39,13 @@
         <item name="android:navigationBarColor">@color/grey875</item>
     </style>
 
+    <style name="Theme.VLC.Onboarding" parent="Theme.VLC.Onboarding.7">
+        <item name="android:windowDrawsSystemBarBackgrounds">true</item>
+        <item name="android:statusBarColor">@color/onboarding_grey</item>
+        <item name="android:windowLightStatusBar">false</item>
+        <item name="android:navigationBarColor">@color/onboarding_grey</item>
+    </style>
+
     <style name="Theme.VLC.PickerDialog.Dark" parent="Theme.VLC.PickerDialog.Dark.7">
         <item name="android:windowDrawsSystemBarBackgrounds">true</item>
         <item name="android:statusBarColor">@color/black</item>
diff --git a/application/vlc-android/res/values/styles.xml b/application/vlc-android/res/values/styles.xml
index 748e2f63c..fb3691144 100644
--- a/application/vlc-android/res/values/styles.xml
+++ b/application/vlc-android/res/values/styles.xml
@@ -266,7 +266,8 @@
         <item name="audio_chip_text_color">@color/black_transparent_60</item>
     </style>
 
-    <style name="Theme.VLC.Onboarding" parent="Theme.VLC.Black">
+    <style name="Theme.VLC.Onboarding" parent="Theme.VLC.Onboarding.7"/>
+    <style name="Theme.VLC.Onboarding.7" parent="Theme.VLC.Black">
         <item name="background_default">@color/onboarding_grey</item>
 
 
diff --git a/application/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt b/application/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
index 3e89f5f19..027f33074 100644
--- a/application/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
+++ b/application/vlc-android/src/org/videolan/vlc/gui/onboarding/OnboardingActivity.kt
@@ -53,12 +53,6 @@ class OnboardingActivity : AppCompatActivity(), IOnScanningCustomizeChangedListe
     override fun onCreate(savedInstanceState: Bundle?) {
         super.onCreate(savedInstanceState)
 
-        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
-            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS)
-            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
-            window.statusBarColor = ContextCompat.getColor(this, R.color.onboarding_grey_dark)
-        }
-
         viewModel.permissionGranted = Permissions.canReadStorage(applicationContext)
         setContentView(R.layout.activity_onboarding)
         viewPager = findViewById(R.id.pager)



More information about the Android mailing list