ExactCalculator: Inherit Material3, drop Lineage style and color defs

Change-Id: I77279a5e416efc3932a57cdd51067c0bca1d5dc8
diff --git a/res/layout/fragment_history.xml b/res/layout/fragment_history.xml
index a235c51..6dda2a2 100644
--- a/res/layout/fragment_history.xml
+++ b/res/layout/fragment_history.xml
@@ -26,13 +26,10 @@
         android:id="@+id/history_toolbar"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:background="?attr/colorPrimary"
         android:elevation="4dip"
         android:minHeight="?attr/actionBarSize"
         android:navigationContentDescription="@string/desc_navigate_up"
         app:navigationIcon="?attr/homeAsUpIndicator"
-        android:popupTheme="@style/ThemeOverlay.AppCompat.Light"
-        android:theme="@style/Theme.Toolbar"
         app:title="@string/title_history" />
 
     <androidx.recyclerview.widget.RecyclerView
diff --git a/res/layout/history_item.xml b/res/layout/history_item.xml
index b903564..745d5b8 100644
--- a/res/layout/history_item.xml
+++ b/res/layout/history_item.xml
@@ -42,7 +42,6 @@
         android:paddingStart="@dimen/result_padding_start"
         android:paddingEnd="@dimen/result_padding_end"
         android:text="@string/title_current_expression"
-        android:textColor="?attr/colorAccent"
         android:textSize="14dp" />
 
     <com.android.calculator2.CalculatorScrollView
diff --git a/res/values-night/lineage_colors.xml b/res/values-night/lineage_colors.xml
deleted file mode 100644
index bfda51b..0000000
--- a/res/values-night/lineage_colors.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?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>
-    <!-- Primary color (Color for the toolbars). -->
-    <color name="calculator_primary_color">#212121</color>
-
-    <!-- Status bar color. -->
-    <color name="calculator_statusbar_color">#000000</color>
-
-    <!-- Background color for the operator pad. -->
-    <color name="pad_operator_background_color">#1E1E1E</color>
-
-    <!-- Text color for the formula in the calculator display. -->
-    <color name="display_formula_text_color">@android:color/white</color>
-
-    <!-- Text color for the result in the calculator display. -->
-    <color name="display_result_text_color">#6CFFFFFF</color>
-
-    <!-- Lighter color for exponent while scrolling. -->
-    <color name="display_result_exponent_text_color">#40FFFFFF</color>
-
-    <!-- Text color for a button in a pad. -->
-    <color name="pad_button_text_color">@android:color/white</color>
-
-    <!-- Ripple color when a button is pressed in a pad. -->
-    <color name="pad_button_ripple_color">#33FFFFFF</color>
-</resources>
diff --git a/res/values-night/lineage_styles.xml b/res/values-night/lineage_styles.xml
deleted file mode 100644
index 9d9eb6b..0000000
--- a/res/values-night/lineage_styles.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?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>
-    <style name="Theme" parent="@android:style/Theme.Material">
-        <item name="android:colorPrimary">@color/calculator_primary_color</item>
-        <item name="android:colorAccent">@color/calculator_accent_color</item>
-        <item name="android:statusBarColor">@color/calculator_statusbar_color</item>
-        <item name="android:windowSoftInputMode">stateAlwaysHidden</item>
-    </style>
-
-    <style name="Theme.Toolbar" parent="@android:style/ThemeOverlay.Material.Dark.ActionBar" />
-</resources>
diff --git a/res/values-w375dp-h768dp-port/styles.xml b/res/values-w375dp-h768dp-port/styles.xml
deleted file mode 100644
index 309824b..0000000
--- a/res/values-w375dp-h768dp-port/styles.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2016 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 xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <style name="PadButtonStyle.Advanced">
-        <item name="android:textColor">@color/pad_button_advanced_text_color</item>
-        <item name="android:textSize">27dip</item>
-    </style>
-
-    <style name="PadButtonStyle.Advanced.Text">
-        <item name="textAllCaps">true</item>
-        <item name="android:textSize">24dip</item>
-    </style>
-
-    <style name="PadButtonStyle.Numeric">
-        <item name="android:textSize">36dip</item>
-    </style>
-
-    <style name="PadButtonStyle.Operator">
-        <item name="android:textSize">36dip</item>
-    </style>
-
-    <style name="PadButtonStyle.Operator.Text">
-        <item name="textAllCaps">true</item>
-        <item name="android:textSize">24dip</item>
-    </style>
-
-</resources>
diff --git a/res/values-w520dp-h375dp-land/styles.xml b/res/values-w520dp-h375dp-land/styles.xml
index 84d70bd..c6a63d9 100644
--- a/res/values-w520dp-h375dp-land/styles.xml
+++ b/res/values-w520dp-h375dp-land/styles.xml
@@ -18,7 +18,6 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
 
     <style name="PadButtonStyle.Advanced">
-        <item name="android:textColor">@color/pad_button_advanced_text_color</item>
         <item name="android:textSize">20dip</item>
     </style>
 
diff --git a/res/values-w520dp-h500dp-land/styles.xml b/res/values-w520dp-h500dp-land/styles.xml
index de99b2c..1fce1f2 100644
--- a/res/values-w520dp-h500dp-land/styles.xml
+++ b/res/values-w520dp-h500dp-land/styles.xml
@@ -18,7 +18,6 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
 
     <style name="PadButtonStyle.Advanced">
-        <item name="android:textColor">@color/pad_button_advanced_text_color</item>
         <item name="android:textSize">23dip</item>
     </style>
 
diff --git a/res/values-w520dp-h768dp-land/styles.xml b/res/values-w520dp-h768dp-land/styles.xml
index 2421c8a..8665fb5 100644
--- a/res/values-w520dp-h768dp-land/styles.xml
+++ b/res/values-w520dp-h768dp-land/styles.xml
@@ -18,7 +18,6 @@
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
 
     <style name="PadButtonStyle.Advanced">
-        <item name="android:textColor">@color/pad_button_advanced_text_color</item>
         <item name="android:textSize">30dip</item>
     </style>
 
diff --git a/res/values-w520dp-h768dp-port/styles.xml b/res/values-w520dp-h768dp-port/styles.xml
deleted file mode 100644
index 6293796..0000000
--- a/res/values-w520dp-h768dp-port/styles.xml
+++ /dev/null
@@ -1,43 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2016 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 xmlns:android="http://schemas.android.com/apk/res/android">
-
-    <style name="PadButtonStyle.Advanced">
-        <item name="android:textColor">@color/pad_button_advanced_text_color</item>
-        <item name="android:textSize">32dip</item>
-    </style>
-
-    <style name="PadButtonStyle.Advanced.Text">
-        <item name="textAllCaps">true</item>
-        <item name="android:textSize">28dip</item>
-    </style>
-
-    <style name="PadButtonStyle.Numeric">
-        <item name="android:textSize">38dip</item>
-    </style>
-
-    <style name="PadButtonStyle.Operator">
-        <item name="android:textSize">38dip</item>
-    </style>
-
-    <style name="PadButtonStyle.Operator.Text">
-        <item name="textAllCaps">true</item>
-        <item name="android:textSize">28dip</item>
-    </style>
-
-</resources>
diff --git a/res/values/lineage_colors.xml b/res/values/lineage_colors.xml
deleted file mode 100644
index 0deed33..0000000
--- a/res/values/lineage_colors.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?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>
-    <color name="navigationBar_color">@android:color/white</color>
-    <color name="navigationBar_divider">#1f000000</color>
-</resources>
diff --git a/res/values/lineage_styles.xml b/res/values/lineage_styles.xml
deleted file mode 100644
index 1054f93..0000000
--- a/res/values/lineage_styles.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?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>
-    <style name="Theme.Toolbar" parent="@android:style/ThemeOverlay.Material.ActionBar" />
-</resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index e655816..5dfee6c 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -17,7 +17,7 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
 
-    <style name="DisplayTextStyle" parent="@android:style/Widget.Material.Light.TextView">
+    <style name="DisplayTextStyle" parent="Widget.MaterialComponents.TextView">
         <item name="android:cursorVisible">false</item>
         <item name="fontFamily">sans-serif</item>
         <item name="android:includeFontPadding">false</item>
diff --git a/res/values/themes.xml b/res/values/themes.xml
index cc6dc3e..2588d1c 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -17,19 +17,15 @@
 
 <resources>
 
-    <style name="Theme" parent="@android:style/Theme.Material.Light">
-        <item name="colorPrimary">@color/calculator_primary_color</item>
-        <item name="colorAccent">@color/calculator_accent_color</item>
+    <style name="Theme" parent="Theme.Material3.DayNight">
         <item name="android:statusBarColor">@color/calculator_statusbar_color</item>
+        <item name="android:windowLightStatusBar">?isLightTheme</item>
         <item name="android:windowSoftInputMode">stateAlwaysHidden</item>
         <item name="android:navigationBarColor">@color/navigationBar_color</item>
-        <item name="android:navigationBarDividerColor">@color/navigationBar_divider</item>
-        <item name="android:windowLightStatusBar">true</item>
-        <item name="android:windowLightNavigationBar">true</item>
+        <item name="android:windowLightNavigationBar">?isLightTheme</item>
     </style>
 
     <style name="Theme.Calculator">
-        <item name="windowActionBar">false</item>
         <item name="windowActionModeOverlay">true</item>
         <item name="android:windowContentOverlay">@null</item>
         <item name="windowNoTitle">true</item>