diff --git a/Android.bp b/Android.bp
index 0b867ed51ee30f756be6d150e655c7b022eeb85f..8f7f7705c76ad633fb27cc11bc14f43c4305cb73 100644
--- a/Android.bp
+++ b/Android.bp
@@ -36,5 +36,7 @@ android_app {
"androidx.legacy_legacy-support-v4",
"androidx.gridlayout_gridlayout",
"androidx.recyclerview_recyclerview",
+ "androidx.webkit_webkit",
+ "elib",
],
}
diff --git a/assets/licenses.html b/assets/licenses.html
index 4583bf74d041885bf1bf9c365d5de27884c66379..480c32464cef5438c287fd583ad15f47cff4148c 100644
--- a/assets/licenses.html
+++ b/assets/licenses.html
@@ -1,7 +1,7 @@
-
+
Notices for files:
diff --git a/res/drawable/ic_advanced_bar.xml b/res/drawable/ic_advanced_bar.xml
new file mode 100644
index 0000000000000000000000000000000000000000..89623f80ea9bf26d41a04890ce2556825c863677
--- /dev/null
+++ b/res/drawable/ic_advanced_bar.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
diff --git a/res/drawable/ic_del.xml b/res/drawable/ic_del.xml
index f26eac248e552b3d001dcb493cf85a68c99d6b61..716c62ea6260e4be29e26ce822c838816a336082 100644
--- a/res/drawable/ic_del.xml
+++ b/res/drawable/ic_del.xml
@@ -14,16 +14,13 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
-
-
+ android:height="24dp"
+ android:viewportWidth="24"
+ android:viewportHeight="24">
+
+
diff --git a/res/drawable/ic_launcher_background.xml b/res/drawable/ic_launcher_background.xml
index 4b7005db14836158ea3622d986534674d230f6ba..b16b69a1cf07eb523c025e9e0d93bf7f536d64a6 100644
--- a/res/drawable/ic_launcher_background.xml
+++ b/res/drawable/ic_launcher_background.xml
@@ -1,47 +1,37 @@
+ ~ Copyright ECORP SAS 2022
+ ~ This program is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program. If not, see .
+ -->
-
-
-
-
-
-
-
-
-
-
-
+ android:pathData="M0,0h108v108h-108z">
+
+
+
+
+
+
+
diff --git a/res/drawable/ic_launcher_foreground.xml b/res/drawable/ic_launcher_foreground.xml
index e2f10e21febbc49eb4d7e78e7b77bd71942e79c3..da55a6b12975c4d4e00cd4342b316e7f504e251f 100644
--- a/res/drawable/ic_launcher_foreground.xml
+++ b/res/drawable/ic_launcher_foreground.xml
@@ -1,57 +1,67 @@
+ ~ Copyright ECORP SAS 2022
+ ~ This program is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program. If not, see .
+ -->
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/drawable/ic_launcher_monochrome.xml b/res/drawable/ic_launcher_monochrome.xml
deleted file mode 100644
index e8f78b9280ee0fb22ae3282fb30a97fbbd41c19c..0000000000000000000000000000000000000000
--- a/res/drawable/ic_launcher_monochrome.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
diff --git a/res/layout-land/pad_advanced_3x5.xml b/res/layout-land/pad_advanced_3x5.xml
new file mode 100644
index 0000000000000000000000000000000000000000..c17548b0a6dac37c13148192b5695b3283e081f2
--- /dev/null
+++ b/res/layout-land/pad_advanced_3x5.xml
@@ -0,0 +1,184 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/activity_calculator_land.xml b/res/layout/activity_calculator_land.xml
index a19cd8615f27c49b64c7a34ab31c8c0a601a5e31..8fc54ed02c889a82e2673757f9510e5c46031bda 100644
--- a/res/layout/activity_calculator_land.xml
+++ b/res/layout/activity_calculator_land.xml
@@ -26,13 +26,17 @@
android:layout_width="match_parent"
android:layout_height="wrap_content" />
+
+
-
-
+
diff --git a/res/layout/activity_calculator_port.xml b/res/layout/activity_calculator_port.xml
index 30aaf005f84b322f2941e177bf5c5ca5b81df0c7..f935b964fcffc97b71034ece25005647079b2136 100644
--- a/res/layout/activity_calculator_port.xml
+++ b/res/layout/activity_calculator_port.xml
@@ -23,6 +23,11 @@
+
+
-
-
+
diff --git a/res/layout/activity_calculator_tablet_port.xml b/res/layout/activity_calculator_tablet_port.xml
index 9eab3af498652f642a91bfa34d9b5507bf3f5fb6..57e930632b97adb6790d0f39879b5119fb2812c9 100644
--- a/res/layout/activity_calculator_tablet_port.xml
+++ b/res/layout/activity_calculator_tablet_port.xml
@@ -23,6 +23,11 @@
+
+
-
-
+
diff --git a/res/layout/fragment_history.xml b/res/layout/fragment_history.xml
index 0559c8719192495cabd8169915bc086236952baf..1625f52a9457e422dad378a84e08f5bf2375213d 100644
--- a/res/layout/fragment_history.xml
+++ b/res/layout/fragment_history.xml
@@ -31,7 +31,6 @@
android:minHeight="?android:attr/actionBarSize"
android:navigationContentDescription="@string/desc_navigate_up"
android:navigationIcon="?android:attr/homeAsUpIndicator"
- android:popupTheme="@android:style/ThemeOverlay.Material.Light"
android:theme="@style/Theme.Toolbar"
android:title="@string/title_history" />
diff --git a/res/layout/history_item.xml b/res/layout/history_item.xml
index cf8b6c062223836e1bad1c441c12115e07e291f8..4b319df8fcab2c04758b9af3b1ca9878e344491e 100644
--- a/res/layout/history_item.xml
+++ b/res/layout/history_item.xml
@@ -42,7 +42,7 @@
android:paddingStart="@dimen/result_padding_start"
android:paddingEnd="@dimen/result_padding_end"
android:text="@string/title_current_expression"
- android:textColor="?android:attr/colorAccent"
+ android:textColor="?android:attr/textColorPrimary"
android:textSize="14dp" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ android:orientation="horizontal"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:background="@color/pad_advanced_background_color" >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/res/layout/pad_main.xml b/res/layout/pad_main.xml
new file mode 100644
index 0000000000000000000000000000000000000000..14801e59df083207a0811d4309cb2d950911ef85
--- /dev/null
+++ b/res/layout/pad_main.xml
@@ -0,0 +1,191 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/res/layout/pad_numeric.xml b/res/layout/pad_numeric.xml
deleted file mode 100644
index cfe308b15effddb5431c8edd40305c6e629f261d..0000000000000000000000000000000000000000
--- a/res/layout/pad_numeric.xml
+++ /dev/null
@@ -1,112 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/res/mipmap-anydpi/ic_launcher.xml b/res/mipmap-anydpi/ic_launcher.xml
index b58c81ff94fc2cd9353409539d491f43b91966a5..463b2ba98877d6eeff865041a7336a7e87caf44d 100644
--- a/res/mipmap-anydpi/ic_launcher.xml
+++ b/res/mipmap-anydpi/ic_launcher.xml
@@ -1,10 +1,22 @@
+ ~ Copyright ECORP SAS 2022
+ ~ This program is free software: you can redistribute it and/or modify
+ ~ it under the terms of the GNU General Public License as published by
+ ~ the Free Software Foundation, either version 3 of the License, or
+ ~ (at your option) any later version.
+ ~
+ ~ This program is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ ~ GNU General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU General Public License
+ ~ along with this program. If not, see .
+ -->
-
-
-
+
+
+
+
diff --git a/res/values-fr/strings.xml b/res/values-fr/strings.xml
index 8e0bea48e3dc1e4248f6f4b81c7c2e7d7420ac85..b777f04f04d1151c07ad41cdf1487f036cc4dd1c 100644
--- a/res/values-fr/strings.xml
+++ b/res/values-fr/strings.xml
@@ -1,4 +1,4 @@
-
+
-
-
- "Calculatrice"
- ","
- "deg"
- "rad"
- "effacés"
- "sup"
- "nombre d\'Euler"
- "pi"
- "virgule"
- "parenthèse gauche"
- "parenthèse droite"
- "cosinus"
- "logarithme naturel"
- "logarithme"
- "sinus"
- "tangente"
- "cosinus inverse"
- "sinus inverse"
- "tangente inverse"
- "dix à la puissance"
- "fonction exponentielle"
- "au carré"
- "plus"
- "divisé"
- "factoriel"
- "multiplier"
- "pourcent"
- "puissance"
- "racine carrée"
- "moins"
- "mode degrés"
- "mode radians"
- "passer en mode degrés"
- "passer en mode radians"
- "égal"
- "effacer"
- "supprimer"
- "afficher les fonctions inverses"
- "masquer les fonctions inverses"
- "Aucune formule"
- "Aucun résultat"
- "Nombres et opérations de base"
- "Opérations avancées"
- "Pas un nombre"
- "Express. incorr."
+ -->
+ Calculatrice
+ ,
+ deg
+ rad
+ effacé
+ suppr
+ nombre d\'Euler
+ pi
+ virgule
+ parenthèse gauche
+ parenthèse droite
+ cosinus
+ logarithme naturel
+ logarithme
+ sinus
+ tangente
+ cosinus inverse
+ sinus inverse
+ tangente inverse
+ dix à la puissance
+ fonction exponentielle
+ au carré
+ plus
+ diviser
+ factoriel
+ multiplier
+ pour cent
+ puissance
+ racine carrée
+ moins
+ mode degré
+ mode radian
+ passer en mode degré
+ passer en mode radian
+ égale
+ effacer
+ supprimer
+ afficher les fonctions inverses
+ masquer les fonctions inverses
+ Aucune formule
+ Aucun résultat
+ Nombres et opérations de base
+ Opérations avancées
+ Pas un nombre
+ Express. incorr.
"Annulée"
- "Infini ?"
- "Div par 0 impossible"
- "Le texte a bien été copié."
- "Calcul annulé."
- "Il est possible que la valeur soit infinie ou non définie."
- "Utiliser délais plus longs"
- "Fermer"
- "(exact)"
- "(±1 au dernier chiffre)"
- "Réponse avec prem. chiffres"
+ Infini \?
+ Div par 0 impossible
+ Texte copié
+ Calcul annulé.
+ Il est possible que la valeur soit infinie ou non définie.
+ Utiliser des délais plus longs
+ Ignorer
+ (exact)
+ (±1 sur dernier chiffre)
+ Réponse avec prem. chiffres
"Réponse en fraction"
- "Licences Open Source"
- "Historique"
- "Effacer"
- "Historique"
- "Remonter d\'un niveau"
- "Expiration du délai"
- "Effacer historique et mémoire ?"
- "Expression actuelle"
- "Aucun historique"
-
+ Licences Open Source
+ Historique
+ Effacer
+ Historique
+ Remonter d\'un niveau
+ Expiration du délai
+ Effacer l\'historique et la mémoire \?
+ Expression actuelle
+ Aucun historique
+
\ No newline at end of file
diff --git a/res/values-night/lineage_colors.xml b/res/values-night/lineage_colors.xml
deleted file mode 100644
index bfda51b606d6b67a69d49d37e5f79b83e12ff573..0000000000000000000000000000000000000000
--- a/res/values-night/lineage_colors.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
-
-
- #212121
-
-
- #000000
-
-
- #1E1E1E
-
-
- @android:color/white
-
-
- #6CFFFFFF
-
-
- #40FFFFFF
-
-
- @android:color/white
-
-
- #33FFFFFF
-
diff --git a/res/values-night/lineage_styles.xml b/res/values-night/lineage_styles.xml
index 9d9eb6b9151f28db482cbe2e481e3c1ba23c2568..90016c792318ccba33408c79db2eb780d92d93bc 100644
--- a/res/values-night/lineage_styles.xml
+++ b/res/values-night/lineage_styles.xml
@@ -20,7 +20,10 @@
- @color/calculator_primary_color
- @color/calculator_accent_color
- @color/calculator_statusbar_color
+ - @color/navigationBar_color
- stateAlwaysHidden
+ - false
+ - false
diff --git a/res/values-nl/strings.xml b/res/values-nl/strings.xml
index 64241ad2dc3a792e8852f4968b831a5293b85a09..555742e8e3c259eaadddbe933a4c475816db5761 100644
--- a/res/values-nl/strings.xml
+++ b/res/values-nl/strings.xml
@@ -1,4 +1,4 @@
-
+
-
-
+ -->
"Rekenmachine"
","
"deg"
- "rad"
+ rad
"gewist"
"←"
"constante van Neper"
@@ -70,7 +67,7 @@
"De waarde is mogelijk oneindig of niet gedefinieerd."
"Langere time-outs gebruiken"
"Sluiten"
- "(exact)"
+ (exact)
"(±1 in laatste cijfer)"
"Antwoord met voorloopcijfers"
"Antwoord als breuk"
@@ -83,4 +80,4 @@
"Geschiedenis/geheugen wissen?"
"Huidige expressie"
"Geen geschiedenis"
-
+
\ No newline at end of file
diff --git a/res/values-w230dp-h275dp/layout.xml b/res/values-w230dp-h275dp/layout.xml
index f9a2d970a36ccbd7d220c37a9ec10593b6e8bb3d..07752d7de40c84b74f6449aa57a543e9fd9b27bc 100644
--- a/res/values-w230dp-h275dp/layout.xml
+++ b/res/values-w230dp-h275dp/layout.xml
@@ -18,6 +18,5 @@
- @layout/activity_calculator_port
- @layout/display_two_line
- - @layout/pad_operator_one_col
- - @layout/pad_advanced_4x4
+ - @layout/pad_advanced_3x5
diff --git a/res/values-w230dp-h375dp/layout.xml b/res/values-w230dp-h375dp/layout.xml
index f9a2d970a36ccbd7d220c37a9ec10593b6e8bb3d..07752d7de40c84b74f6449aa57a543e9fd9b27bc 100644
--- a/res/values-w230dp-h375dp/layout.xml
+++ b/res/values-w230dp-h375dp/layout.xml
@@ -18,6 +18,5 @@
- @layout/activity_calculator_port
- @layout/display_two_line
- - @layout/pad_operator_one_col
- - @layout/pad_advanced_4x4
+ - @layout/pad_advanced_3x5
diff --git a/res/values-w230dp-h475dp-port/layout.xml b/res/values-w230dp-h475dp-port/layout.xml
index 9f7bd6bbfc2a639e76fbfdf5c4a30f78cff5395b..07752d7de40c84b74f6449aa57a543e9fd9b27bc 100644
--- a/res/values-w230dp-h475dp-port/layout.xml
+++ b/res/values-w230dp-h475dp-port/layout.xml
@@ -18,6 +18,5 @@
- @layout/activity_calculator_port
- @layout/display_two_line
- - @layout/pad_operator_one_col
- @layout/pad_advanced_3x5
diff --git a/res/values-w375dp-h220dp/layout.xml b/res/values-w375dp-h220dp/layout.xml
index ac4cde83959a52a8befafbb3cad1db8c14b091d1..611e2fa2788a1b1ee077cb94a3167f04a327a7dd 100644
--- a/res/values-w375dp-h220dp/layout.xml
+++ b/res/values-w375dp-h220dp/layout.xml
@@ -18,6 +18,5 @@
- @layout/activity_calculator_port
- @layout/display_one_line
- - @layout/pad_operator_two_col
- - @layout/pad_advanced_4x4
+ - @layout/pad_advanced_3x5
diff --git a/res/values-w375dp-h275dp/layout.xml b/res/values-w375dp-h275dp/layout.xml
index 3890667a7249129538b133f1c282940ce8afffa0..07752d7de40c84b74f6449aa57a543e9fd9b27bc 100644
--- a/res/values-w375dp-h275dp/layout.xml
+++ b/res/values-w375dp-h275dp/layout.xml
@@ -18,6 +18,5 @@
- @layout/activity_calculator_port
- @layout/display_two_line
- - @layout/pad_operator_two_col
- - @layout/pad_advanced_4x4
+ - @layout/pad_advanced_3x5
diff --git a/res/values-w375dp-h375dp/layout.xml b/res/values-w375dp-h375dp/layout.xml
index 3890667a7249129538b133f1c282940ce8afffa0..07752d7de40c84b74f6449aa57a543e9fd9b27bc 100644
--- a/res/values-w375dp-h375dp/layout.xml
+++ b/res/values-w375dp-h375dp/layout.xml
@@ -18,6 +18,5 @@
- @layout/activity_calculator_port
- @layout/display_two_line
- - @layout/pad_operator_two_col
- - @layout/pad_advanced_4x4
+ - @layout/pad_advanced_3x5
diff --git a/res/values-w375dp-h500dp-port/layout.xml b/res/values-w375dp-h500dp-port/layout.xml
index 9f7bd6bbfc2a639e76fbfdf5c4a30f78cff5395b..07752d7de40c84b74f6449aa57a543e9fd9b27bc 100644
--- a/res/values-w375dp-h500dp-port/layout.xml
+++ b/res/values-w375dp-h500dp-port/layout.xml
@@ -18,6 +18,5 @@
- @layout/activity_calculator_port
- @layout/display_two_line
- - @layout/pad_operator_one_col
- @layout/pad_advanced_3x5
diff --git a/res/values-w375dp-h768dp-port/layout.xml b/res/values-w375dp-h768dp-port/layout.xml
index 98db0fee84eae520c240a8d8db91439d8e050d18..07752d7de40c84b74f6449aa57a543e9fd9b27bc 100644
--- a/res/values-w375dp-h768dp-port/layout.xml
+++ b/res/values-w375dp-h768dp-port/layout.xml
@@ -16,8 +16,7 @@
-->
- - @layout/activity_calculator_tablet_port
+ - @layout/activity_calculator_port
- @layout/display_two_line
- - @layout/pad_advanced_5x3
- - @layout/pad_operator_two_col
+ - @layout/pad_advanced_3x5
diff --git a/res/values-w375dp-h768dp-port/styles.xml b/res/values-w375dp-h768dp-port/styles.xml
index 2c5ae3573d9de03d17682c212f5cf71de0b74a10..b8caea0b83466bb055badd125f24413ef363fb28 100644
--- a/res/values-w375dp-h768dp-port/styles.xml
+++ b/res/values-w375dp-h768dp-port/styles.xml
@@ -46,8 +46,7 @@
+
+
+
+
+
+
diff --git a/res/values/themes.xml b/res/values/themes.xml
index 2104fe35380bb81ff46de37f464d4babafa768e5..781214db39f697f94fad9e04b8b0460c9d9e1002 100644
--- a/res/values/themes.xml
+++ b/res/values/themes.xml
@@ -34,10 +34,17 @@
- @null
- true
- ltr
+ - @style/Theme.Popup
+ - @style/Theme.Overflow
-
+
+
diff --git a/src/com/android/calculator2/Calculator.java b/src/com/android/calculator2/Calculator.java
index 81ab1f6511c4e65cd7c6576fa7b6fe4a0e48ffc5..d765e05502cf964940d93efc84bf74dbf4559db9 100644
--- a/src/com/android/calculator2/Calculator.java
+++ b/src/com/android/calculator2/Calculator.java
@@ -520,7 +520,6 @@ public class Calculator extends Activity
ContextCompat.getColor(this, R.color.calculator_error_color);
mFormulaText.setTextColor(errorColor);
mResultText.setTextColor(errorColor);
- getWindow().setStatusBarColor(errorColor);
} else if (mCurrentState != CalculatorState.RESULT) {
mFormulaText.setTextColor(
ContextCompat.getColor(this, R.color.display_formula_text_color));
diff --git a/src/com/android/calculator2/Licenses.java b/src/com/android/calculator2/Licenses.java
index 4af1ea6d09bb8f45364033c19a1d9f34298289c2..81bf117ef10e215003bf60d33c5e5e986d5c5767 100644
--- a/src/com/android/calculator2/Licenses.java
+++ b/src/com/android/calculator2/Licenses.java
@@ -4,6 +4,10 @@ import android.app.Activity;
import android.os.Bundle;
import android.view.MenuItem;
import android.webkit.WebView;
+import android.content.res.Configuration;
+import androidx.webkit.WebViewFeature;
+import androidx.webkit.WebSettingsCompat;
+
public class Licenses extends Activity {
@@ -17,6 +21,19 @@ public class Licenses extends Activity {
webView.loadUrl(LICENSE_URL);
setContentView(webView);
+
+ if (WebViewFeature.isFeatureSupported(WebViewFeature.FORCE_DARK)) {
+ switch (getResources().getConfiguration().uiMode & Configuration.UI_MODE_NIGHT_MASK) {
+ case Configuration.UI_MODE_NIGHT_YES:
+ WebSettingsCompat.setForceDark(webView.getSettings(), WebSettingsCompat.FORCE_DARK_ON);
+ break;
+ case Configuration.UI_MODE_NIGHT_NO:
+ case Configuration.UI_MODE_NIGHT_UNDEFINED:
+ WebSettingsCompat.setForceDark(webView.getSettings(), WebSettingsCompat.FORCE_DARK_OFF);
+ break;
+ }
+}
+
}
@Override