diff options
| author | Pranav Vashi <neobuddy89@gmail.com> | 2022-08-01 01:57:11 +0530 |
|---|---|---|
| committer | Semavi Ulusoy <doc.divxm@gmail.com> | 2022-09-13 10:47:52 +0300 |
| commit | 4a1df426da8a64386f606958ae42873c552cc8f6 (patch) | |
| tree | 8d69730237536ee40c2d5c51dacec2ffaed19d6b | |
| parent | 25d442ee9b811265930eabcc7a006e0328823b59 (diff) | |
Dialer: Properly set navigation bar theme
Signed-off-by: Pranav Vashi <neobuddy89@gmail.com>
Change-Id: I0c28097d1e876d2bcc3ff77c1da630c13c60b0b7
8 files changed, 71 insertions, 36 deletions
diff --git a/java/com/android/dialer/app/res/values-night/aicp_bools.xml b/java/com/android/dialer/app/res/values-night/aicp_bools.xml new file mode 100644 index 000000000..f017662e3 --- /dev/null +++ b/java/com/android/dialer/app/res/values-night/aicp_bools.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2018 The LineageOS 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> + + <bool name="light_navigation_bar">false</bool> +</resources> diff --git a/java/com/android/dialer/app/res/values-v27/styles.xml b/java/com/android/dialer/app/res/values-v27/styles.xml index bc9b119a5..7bb62fdc9 100644 --- a/java/com/android/dialer/app/res/values-v27/styles.xml +++ b/java/com/android/dialer/app/res/values-v27/styles.xml @@ -16,7 +16,7 @@ --> <resources> <style name="DialtactsTheme" parent="Dialer.ThemeBase.ActionBar"> - <item name="android:windowLightNavigationBar">true</item> + <item name="android:windowLightNavigationBar">@bool/light_navigation_bar</item> <item name="android:navigationBarColor">?android:attr/windowBackground</item> <item name="android:navigationBarDividerColor">#E0E0E0</item> </style> diff --git a/java/com/android/dialer/app/res/values/aicp_bools.xml b/java/com/android/dialer/app/res/values/aicp_bools.xml index c8aab8c66..ccd310d1a 100644 --- a/java/com/android/dialer/app/res/values/aicp_bools.xml +++ b/java/com/android/dialer/app/res/values/aicp_bools.xml @@ -16,4 +16,6 @@ <resources> <!-- Disable speaker proximity preference for problematic devices --> <bool name="config_enabled_speakerprox" translatable="false">true</bool> + + <bool name="light_navigation_bar">true</bool> </resources> diff --git a/java/com/android/dialer/main/impl/res/values-night/aicp_bools.xml b/java/com/android/dialer/main/impl/res/values-night/aicp_bools.xml new file mode 100644 index 000000000..f017662e3 --- /dev/null +++ b/java/com/android/dialer/main/impl/res/values-night/aicp_bools.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2018 The LineageOS 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> + + <bool name="light_navigation_bar">false</bool> +</resources> diff --git a/java/com/android/dialer/main/impl/res/values-night/styles.xml b/java/com/android/dialer/main/impl/res/values-night/styles.xml deleted file mode 100644 index 63d4e9c1e..000000000 --- a/java/com/android/dialer/main/impl/res/values-night/styles.xml +++ /dev/null @@ -1,27 +0,0 @@ -<?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> diff --git a/java/com/android/dialer/main/impl/res/values-v27/styles.xml b/java/com/android/dialer/main/impl/res/values-v27/styles.xml index 261012ed5..b8e4f2c8d 100644 --- a/java/com/android/dialer/main/impl/res/values-v27/styles.xml +++ b/java/com/android/dialer/main/impl/res/values-v27/styles.xml @@ -20,17 +20,17 @@ <!-- TODO(a bug): refactor into dialer/theme --> <style name="MainActivityTheme" parent="MainActivityThemeBase"> <!-- Used to change the navigation bar color --> - <item name="android:windowLightNavigationBar">true</item> - <item name="android:navigationBarColor">?android:attr/colorBackgroundFloating</item> - <item name="android:navigationBarDividerColor">#E0E0E0</item> + <item name="android:windowLightNavigationBar">@bool/light_navigation_bar</item> + <item name="android:navigationBarColor">@color/rounded_dialpad_bg_color</item> + <item name="android:navigationBarDividerColor">@null</item> </style> <!-- Used on sdk 27 and above --> <!-- TODO(a bug): refactor into dialer/theme --> <style name="MainActivityTheme.Dark" parent="MainActivityThemeBase.Dark"> <!-- Used to change the navigation bar color --> - <item name="android:windowLightNavigationBar">true</item> - <item name="android:navigationBarColor">?android:attr/colorBackgroundFloating</item> - <item name="android:navigationBarDividerColor">#E0E0E0</item> + <item name="android:windowLightNavigationBar">@bool/light_navigation_bar</item> + <item name="android:navigationBarColor">@color/rounded_dialpad_bg_color</item> + <item name="android:navigationBarDividerColor">@null</item> </style> -</resources>
\ No newline at end of file +</resources> diff --git a/java/com/android/dialer/main/impl/res/values/aicp_bools.xml b/java/com/android/dialer/main/impl/res/values/aicp_bools.xml new file mode 100644 index 000000000..7b0f4e19a --- /dev/null +++ b/java/com/android/dialer/main/impl/res/values/aicp_bools.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + Copyright (C) 2018 The LineageOS 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> + + <bool name="light_navigation_bar">true</bool> +</resources> diff --git a/java/com/android/dialer/main/impl/res/values/styles.xml b/java/com/android/dialer/main/impl/res/values/styles.xml index 4b153b680..e2309795c 100644 --- a/java/com/android/dialer/main/impl/res/values/styles.xml +++ b/java/com/android/dialer/main/impl/res/values/styles.xml @@ -21,7 +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> + <item name="android:windowLightStatusBar">@bool/light_navigation_bar</item> </style> <!-- Activities should use this theme as their style --> |
