Skip to content

Commit

Permalink
Dialer: set statusbar color same as activity background
Browse files Browse the repository at this point in the history
 * Keep styles that use actionBar as is because it uses
   normal actionbar
 * Set light statusbar attribute for some styles

Change-Id: I8748aa4d12f8e0c68d14d514ea5a2bd4100ee3ca
  • Loading branch information
trautamaki authored and alanndz committed Jun 11, 2022
1 parent c2bef1d commit 57726f9
Show file tree
Hide file tree
Showing 6 changed files with 53 additions and 2 deletions.
27 changes: 27 additions & 0 deletions java/com/android/dialer/main/impl/res/values-night/styles.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2017 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
<resources>

<style name="LaunchTheme" parent="Theme.AppCompat.DayNight.DarkActionBar">
<item name="android:colorPrimary">@color/dialer_theme_color</item>
<item name="colorPrimary">@color/dialer_theme_color</item>
<item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
<item name="colorPrimaryDark">@color/dialer_theme_color_dark</item>
<item name="android:windowLightStatusBar">false</item>
</style>

</resources>
1 change: 1 addition & 0 deletions java/com/android/dialer/main/impl/res/values/styles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<item name="colorPrimary">@color/dialer_theme_color</item>
<item name="android:colorPrimaryDark">@color/dialer_theme_color_dark</item>
<item name="colorPrimaryDark">@color/dialer_theme_color_dark</item>
<item name="android:windowLightStatusBar">true</item>
</style>

<!-- Activities should use this theme as their style -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<item name="actionBarTheme">@style/DialerActionBarBaseTheme</item>
<item name="listChoiceBackgroundIndicator">@drawable/abc_list_selector_holo_dark</item>

<item name="android:colorPrimaryDark">@color/settings_primary_dark</item>
<item name="colorControlHighlight">@color/dialer_ripple_color</item>
</style>

Expand Down
21 changes: 21 additions & 0 deletions java/com/android/dialer/theme/common/res/values-night/colors.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright (C) 2012 The Android Open Source Project
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License
-->
<!-- The colors in this file aren't configured at the theme level. -->
<resources>
<!-- Settings -->
<color name="dialer_settings_theme_color_dark">#1C3AA9</color>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<!-- Essential theme colors -->
<color name="dialer_theme_color">#5195EA</color>
<color name="dialer_theme_color_20pct">#335195EA</color>
<color name="dialer_theme_color_dark">#2374CE</color>
<color name="dialer_secondary_color">#5195EA</color>
<color name="dialer_ripple_color">#33ffffff</color>
<color name="settings_primary_dark">#2374CE</color>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@
<!-- Essential theme colors -->
<color name="dialer_theme_color">#2A56C6</color>
<color name="dialer_theme_color_20pct">#332A56C6</color>
<color name="dialer_theme_color_dark">#1C3AA9</color>
<color name="dialer_theme_color_dark">@color/dialer_background_color</color>
<color name="dialer_secondary_color">#F50057</color>
<color name="dialer_background_color">#FAFAFA</color>
<color name="dialer_ripple_color">#1f000000</color>
<color name="settings_primary_dark">#1C3AA9</color>
</resources>

0 comments on commit 57726f9

Please sign in to comment.