Dbrant has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/311166

Change subject: Use Foundation color as app-wide accent color.
......................................................................

Use Foundation color as app-wide accent color.

This sets Foundation Blue as the "accent color" for the app's theme. This
means a couple things:

- Components that have a color to them (e.g. ProgressBar, Switch, etc)
  will automatically inherit their color from this setting. We no longer
  need to set the color on a per-component basis (like we were doing with
  ProgressBars)
- We will now finally "own" the accent color in the components that our
  app uses, and be able to apply our brand to them.

Change-Id: I8cce0ecc20542f15c466e136d479ebef9ec95bbb
---
M app/src/main/res/layout/activity_page.xml
M app/src/main/res/layout/view_card_progress.xml
M app/src/main/res/values/styles.xml
M app/src/main/res/values/styles_dark.xml
M app/src/main/res/values/styles_light.xml
5 files changed, 15 insertions(+), 25 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/apps/android/wikipedia 
refs/changes/66/311166/1

diff --git a/app/src/main/res/layout/activity_page.xml 
b/app/src/main/res/layout/activity_page.xml
index bff83b4..208735e 100644
--- a/app/src/main/res/layout/activity_page.xml
+++ b/app/src/main/res/layout/activity_page.xml
@@ -63,7 +63,7 @@
                 android:layout_marginTop="-7dp"
                 android:layout_gravity="top"
                 android:max="10000"
-                style="@style/ProgressBarHorizontal" />
+                style="@style/Widget.AppCompat.ProgressBar.Horizontal" />
         </FrameLayout>
 
     </LinearLayout>
diff --git a/app/src/main/res/layout/view_card_progress.xml 
b/app/src/main/res/layout/view_card_progress.xml
index 2ddf65f..61a6d38 100644
--- a/app/src/main/res/layout/view_card_progress.xml
+++ b/app/src/main/res/layout/view_card_progress.xml
@@ -7,7 +7,6 @@
     <ProgressBar
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:layout_gravity="center"
-        style="@style/ProgressBar"/>
+        android:layout_gravity="center"/>
 
 </FrameLayout>
diff --git a/app/src/main/res/values/styles.xml 
b/app/src/main/res/values/styles.xml
index 3210030..60d1851 100644
--- a/app/src/main/res/values/styles.xml
+++ b/app/src/main/res/values/styles.xml
@@ -25,14 +25,12 @@
     </style>
 
     <style name="AppTheme.ToolbarTheme" 
parent="@style/ThemeOverlay.AppCompat.ActionBar">
-        <item name="android:colorControlNormal" 
tools:targetApi="21">@android:color/white</item>
         <item name="colorControlNormal">@android:color/white</item>
         <item name="colorControlActivated">@color/actionbar_highlight</item>
         <item name="colorControlHighlight">@color/actionbar_highlight</item>
     </style>
 
     <style name="AppTheme.ToolbarStyle" 
parent="@style/Widget.AppCompat.ActionBar">
-        <item name="android:background">@color/actionbar_background</item>
         <item name="background">@color/actionbar_background</item>
         <item name="navigationIcon">?attr/homeAsUpIndicator</item>
         <item name="elevation">4dp</item>
@@ -45,13 +43,11 @@
     </style>
 
     <style name="AppTheme.DrawerArrowStyle" 
parent="Widget.AppCompat.DrawerArrowToggle">
-        <item name="android:color">@android:color/white</item>
         <item name="color">@android:color/white</item>
     </style>
 
     <style name="AppTheme.ActionModeStyle" 
parent="@style/Widget.AppCompat.ActionMode">
         <item name="background">@color/actionbar_background</item>
-        <item name="android:background">@color/actionbar_background</item>
         <item name="backgroundSplit">@color/actionbar_background</item>
         <item name="titleTextStyle">@style/AppTheme.ActionModeTitleStyle</item>
         <item 
name="subtitleTextStyle">@style/AppTheme.ActionModeSubtitleStyle</item>
@@ -243,20 +239,6 @@
         <item name="placeholderImageScaleType">center</item>
         <item name="failureImage">@drawable/ic_image_gray_24dp</item>
         <item name="failureImageScaleType">center</item>
-    </style>
-
-    <style name="ProgressBar" parent="Widget.AppCompat.ProgressBar">
-        <item name="android:progressTint" 
tools:targetApi="21">@color/foundation_blue</item>
-        <item name="android:progressTintMode" 
tools:targetApi="21">src_in</item>
-        <item name="android:indeterminateTint" 
tools:targetApi="21">@color/foundation_blue</item>
-        <item name="android:indeterminateTintMode" 
tools:targetApi="21">src_in</item>
-    </style>
-
-    <style name="ProgressBarHorizontal" 
parent="Widget.AppCompat.ProgressBar.Horizontal">
-        <item name="android:progressTint" 
tools:targetApi="21">@color/foundation_blue</item>
-        <item name="android:progressTintMode" 
tools:targetApi="21">src_in</item>
-        <item name="android:indeterminateTint" 
tools:targetApi="21">@color/foundation_blue</item>
-        <item name="android:indeterminateTintMode" 
tools:targetApi="21">src_in</item>
     </style>
 
 </resources>
\ No newline at end of file
diff --git a/app/src/main/res/values/styles_dark.xml 
b/app/src/main/res/values/styles_dark.xml
index 05a9060..640fef1 100644
--- a/app/src/main/res/values/styles_dark.xml
+++ b/app/src/main/res/values/styles_dark.xml
@@ -21,11 +21,11 @@
         <item name="actionBarTheme">@style/AppTheme.ToolbarTheme</item>
         <item name="actionBarStyle">@style/AppTheme.ToolbarStyle</item>
         <item name="actionModeStyle">@style/AppTheme.ActionModeStyle</item>
-        <item 
name="android:actionModeStyle">@style/AppTheme.ActionModeStyle</item>
-        <item 
name="android:autoCompleteTextViewStyle">@style/AppTheme.SearchViewEditTextStyle</item>
         <item 
name="android:panelBackground">@color/background_floating_material_dark</item>
         <item 
name="autoCompleteTextViewStyle">@style/AppTheme.SearchViewEditTextStyle</item>
         <item name="popupMenuStyle">@style/Theme.Dark.PopupMenuStyle</item>
+        <item name="alertDialogTheme">@style/Theme.Light.Dialog.Alert</item>
+        <item name="colorAccent">@color/foundation_blue</item>
         <item 
name="android:windowBackground">@color/window_background_dark</item>
         <item 
name="window_background_color">@color/window_background_dark</item>
         <item name="window_inverse_color">@android:color/white</item>
@@ -66,6 +66,10 @@
         <item 
name="feed_text_tertiary_color">@color/feed_text_tertiary_dark</item>
     </style>
 
+    <style name="Theme.Dark.Dialog.Alert" 
parent="Theme.AppCompat.Dialog.Alert">
+        <item name="colorAccent">@color/foundation_blue</item>
+    </style>
+
     <style name="Theme.Dark.Dialog" parent="Theme.AppCompat.Dialog">
         <item name="windowActionBar">false</item>
         <item name="windowNoTitle">true</item>
diff --git a/app/src/main/res/values/styles_light.xml 
b/app/src/main/res/values/styles_light.xml
index 18d86d0..d7b352c 100644
--- a/app/src/main/res/values/styles_light.xml
+++ b/app/src/main/res/values/styles_light.xml
@@ -21,11 +21,11 @@
         <item name="actionBarTheme">@style/AppTheme.ToolbarTheme</item>
         <item name="actionBarStyle">@style/AppTheme.ToolbarStyle</item>
         <item name="actionModeStyle">@style/AppTheme.ActionModeStyle</item>
-        <item 
name="android:actionModeStyle">@style/AppTheme.ActionModeStyle</item>
-        <item 
name="android:autoCompleteTextViewStyle">@style/AppTheme.SearchViewEditTextStyle</item>
         <item 
name="android:panelBackground">@color/background_floating_material_light</item>
         <item 
name="autoCompleteTextViewStyle">@style/AppTheme.SearchViewEditTextStyle</item>
         <item name="popupMenuStyle">@style/Theme.Light.PopupMenuStyle</item>
+        <item name="alertDialogTheme">@style/Theme.Light.Dialog.Alert</item>
+        <item name="colorAccent">@color/foundation_blue</item>
         <item 
name="android:windowBackground">@color/window_background_light</item>
         <item 
name="window_background_color">@color/window_background_light</item>
         <item name="window_inverse_color">@android:color/black</item>
@@ -67,9 +67,14 @@
         <item 
name="feed_text_tertiary_color">@color/feed_text_tertiary_light</item>
     </style>
 
+    <style name="Theme.Light.Dialog.Alert" 
parent="Theme.AppCompat.Light.Dialog.Alert">
+        <item name="colorAccent">@color/foundation_blue</item>
+    </style>
+
     <style name="Theme.Light.Dialog" parent="Theme.AppCompat.Light.Dialog">
         <item name="windowActionBar">false</item>
         <item name="windowNoTitle">true</item>
+        <item name="colorAccent">@color/foundation_blue</item>
     </style>
 
     <style name="Theme.Light.PopupMenuStyle" 
parent="Widget.AppCompat.Light.PopupMenu">

-- 
To view, visit https://gerrit.wikimedia.org/r/311166
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8cce0ecc20542f15c466e136d479ebef9ec95bbb
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Dbrant <dbr...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to