ExactCalculator: Convert pads to ConstraintLayout

Change-Id: Ibc8fc52ca30e63e355c0c03852010e93d70640bf
diff --git a/res/layout-land/activity_calculator.xml b/res/layout-land/activity_calculator.xml
index 0bf3b01..58843f6 100644
--- a/res/layout-land/activity_calculator.xml
+++ b/res/layout-land/activity_calculator.xml
@@ -3,26 +3,47 @@
     SPDX-FileCopyrightText: 2023 The LineageOS Project
     SPDX-License-Identifier: Apache-2.0
 -->
-<LinearLayout
+<androidx.constraintlayout.widget.ConstraintLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
 
     <include
+        android:id="@+id/display"
         layout="@layout/display_one_line"
         android:layout_width="match_parent"
-        android:layout_height="wrap_content" />
+        android:layout_height="wrap_content"
+        app:layout_constraintBottom_toTopOf="@id/advanced_pad"
+        app:layout_constraintTop_toTopOf="parent" />
 
-    <LinearLayout
-        android:layout_width="match_parent"
-        android:layout_height="0dip"
-        android:layout_weight="100">
+    <include
+        android:id="@+id/advanced_pad"
+        layout="@layout/advanced_pad"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/layout_vertical_guideline"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/display" />
 
-        <include layout="@layout/pad_advanced_3x4" />
-        <include layout="@layout/pad_numeric" />
-        <include layout="@layout/pad_operator_two_col" />
+    <include
+        android:id="@+id/input_pad"
+        layout="@layout/input_pad"
+        android:layout_width="0dp"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/layout_vertical_guideline"
+        app:layout_constraintTop_toBottomOf="@id/display" />
 
-    </LinearLayout>
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/layout_vertical_guideline"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.35" />
 
-</LinearLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout-land/advanced_pad.xml b/res/layout-land/advanced_pad.xml
new file mode 100644
index 0000000..57fe914
--- /dev/null
+++ b/res/layout-land/advanced_pad.xml
@@ -0,0 +1,260 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    SPDX-FileCopyrightText: 2023 The LineageOS Project
+    SPDX-License-Identifier: Apache-2.0
+-->
+<androidx.constraintlayout.widget.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/advanced_pad"
+    style="@style/PadLayoutStyle.Advanced"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="?colorSurface">
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/toggle_mode"
+        style="@style/PadButtonStyle.SmallCaps"
+        android:contentDescription="@string/desc_switch_deg"
+        android:text="@string/mode_deg"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_sqrt"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_op_sqrt"
+        android:text="@string/op_sqrt"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_sqr"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_op_sqr"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/op_sqr"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/const_pi"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_const_pi"
+        android:text="@string/const_pi"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_pow"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_op_pow"
+        android:text="@string/op_pow"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toStartOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_fact"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_op_fact"
+        android:text="@string/op_fact"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="@id/columnGuide2"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_sin"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_sin"
+        android:text="@string/fun_sin"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_arcsin"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_arcsin"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_arcsin"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_cos"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_cos"
+        android:text="@string/fun_cos"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_arccos"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_arccos"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_arccos"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_tan"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_tan"
+        android:text="@string/fun_tan"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_arctan"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_arctan"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_arctan"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/toggle_inv"
+        style="@style/PadButtonStyle.SmallCaps"
+        android:contentDescription="@string/desc_inv_off"
+        android:text="@string/inv"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/const_e"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_const_e"
+        android:text="@string/const_e"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_ln"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_ln"
+        android:text="@string/fun_ln"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_exp"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_exp"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_exp"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_log"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_log"
+        android:text="@string/fun_log"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_10pow"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_10pow"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_10pow"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.33" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.67" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.25" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.5" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide3"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.75" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout-land/input_pad.xml b/res/layout-land/input_pad.xml
new file mode 100644
index 0000000..5ac6b57
--- /dev/null
+++ b/res/layout-land/input_pad.xml
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    SPDX-FileCopyrightText: 2023 The LineageOS Project
+    SPDX-License-Identifier: Apache-2.0
+-->
+<androidx.constraintlayout.widget.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/input_pad"
+    style="@style/PadLayoutStyle"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="?colorSurface">
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/clr"
+        style="@style/PadButtonStyle.Caps"
+        android:contentDescription="@string/desc_clr"
+        android:text="@string/clr"
+        android:theme="@style/Theme.Button.Clear"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide4"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/paren"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_paren"
+        android:text="@string/paren"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide4"
+        app:layout_constraintTop_toTopOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/lparen"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_lparen"
+        android:text="@string/lparen"
+        android:theme="@style/Theme.Button.Operator"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide4"
+        app:layout_constraintTop_toTopOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/rparen"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_rparen"
+        android:text="@string/rparen"
+        android:theme="@style/Theme.Button.Operator"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide4"
+        app:layout_constraintTop_toTopOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_pct"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_pct"
+        android:text="@string/op_pct"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide4"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_div"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_div"
+        android:text="@string/op_div"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide4"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_7"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_7"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_8"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_8"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_9"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_9"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_mul"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_mul"
+        android:text="@string/op_mul"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide4"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_4"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_4"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_5"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_5"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_6"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_6"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_sub"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_sub"
+        android:text="@string/op_sub"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide4"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_1"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_1"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_2"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_2"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_3"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_3"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_add"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_add"
+        android:text="@string/op_add"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide4"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/dec_point"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_dec_point"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_0"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_0"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/del"
+        style="@style/PadButtonStyle.Image"
+        android:contentDescription="@string/desc_del"
+        android:theme="@style/Theme.Button.Numeric"
+        app:icon="@drawable/ic_del"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/eq"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_eq"
+        android:text="@string/eq"
+        android:theme="@style/Theme.Button.Action"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide4"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.2" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.4" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide3"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.6" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide4"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.8" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.25" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.5" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide3"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.75" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout/activity_calculator.xml b/res/layout/activity_calculator.xml
index 62986da..1a9b5c8 100644
--- a/res/layout/activity_calculator.xml
+++ b/res/layout/activity_calculator.xml
@@ -15,31 +15,38 @@
   limitations under the License.
   -->
 
-<LinearLayout
+<androidx.constraintlayout.widget.ConstraintLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/linearLayout"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:orientation="vertical">
 
-    <include layout="@layout/display_two_line" />
-
-    <include layout="@layout/pad_advanced_4x3" />
-
-    <LinearLayout
+    <include
+        android:id="@+id/display"
+        layout="@layout/display_two_line"
         android:layout_width="match_parent"
-        android:layout_height="0dip"
-        android:orientation="vertical"
-        android:layout_weight="225">
+        android:layout_height="wrap_content"
+        app:layout_constraintBottom_toTopOf="@+id/advanced_pad"
+        app:layout_constraintTop_toTopOf="parent" />
 
-        <include layout="@layout/pad_operator_one_col_aux" />
+    <include
+        android:id="@+id/advanced_pad"
+        layout="@layout/advanced_pad"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toTopOf="@+id/input_pad"
+        app:layout_constraintTop_toBottomOf="@id/display"
+        app:layout_constraintVertical_weight="30" />
 
-        <LinearLayout
-            android:layout_width="fill_parent"
-            android:layout_height="0dip"
-            android:layout_weight="750">
+    <include
+        android:id="@+id/input_pad"
+        layout="@layout/input_pad"
+        android:layout_width="match_parent"
+        android:layout_height="0dp"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/advanced_pad"
+        app:layout_constraintVertical_weight="70" />
 
-            <include layout="@layout/pad_numeric"/>
-            <include layout="@layout/pad_operator_one_col" />
-        </LinearLayout>
-      </LinearLayout>
-</LinearLayout>
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout/advanced_pad.xml b/res/layout/advanced_pad.xml
new file mode 100644
index 0000000..9f9765c
--- /dev/null
+++ b/res/layout/advanced_pad.xml
@@ -0,0 +1,261 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    SPDX-FileCopyrightText: 2023 The LineageOS Project
+    SPDX-License-Identifier: Apache-2.0
+-->
+<androidx.constraintlayout.widget.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/advanced_pad"
+    style="@style/PadLayoutStyle.Advanced"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="?colorSurface">
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_sqrt"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_op_sqrt"
+        android:text="@string/op_sqrt"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_sqr"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_op_sqr"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/op_sqr"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/const_pi"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_const_pi"
+        android:text="@string/const_pi"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_pow"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_op_pow"
+        android:text="@string/op_pow"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_fact"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_op_fact"
+        android:text="@string/op_fact"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/toggle_mode"
+        style="@style/PadButtonStyle.SmallCaps"
+        android:contentDescription="@string/desc_switch_deg"
+        android:text="@string/mode_deg"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_sin"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_sin"
+        android:text="@string/fun_sin"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toStartOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_arcsin"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_arcsin"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_arcsin"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toStartOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_cos"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_cos"
+        android:text="@string/fun_cos"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toStartOf="@id/columnGuide2"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_arccos"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_arccos"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_arccos"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toStartOf="@id/columnGuide2"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_tan"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_tan"
+        android:text="@string/fun_tan"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="@id/columnGuide3"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_arctan"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_arctan"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_arctan"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide2"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toStartOf="@id/columnGuide3"
+        app:layout_constraintTop_toTopOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/toggle_inv"
+        style="@style/PadButtonStyle.SmallCaps"
+        android:contentDescription="@string/desc_inv_off"
+        android:text="@string/inv"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/const_e"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_const_e"
+        android:text="@string/const_e"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_ln"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_ln"
+        android:text="@string/fun_ln"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_exp"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_exp"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_exp"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_log"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_log"
+        android:text="@string/fun_log"
+        android:theme="@style/Theme.Button.Advanced"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/fun_10pow"
+        style="@style/PadButtonStyle.SmallText"
+        android:contentDescription="@string/desc_fun_10pow"
+        android:fontFamily="sans-serif-medium"
+        android:text="@string/fun_10pow"
+        android:theme="@style/Theme.Button.Advanced"
+        android:visibility="gone"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide2" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.25" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.5" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide3"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.75" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.33" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.67" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout/input_pad.xml b/res/layout/input_pad.xml
new file mode 100644
index 0000000..b20cd35
--- /dev/null
+++ b/res/layout/input_pad.xml
@@ -0,0 +1,297 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+    SPDX-FileCopyrightText: 2023 The LineageOS Project
+    SPDX-License-Identifier: Apache-2.0
+-->
+<androidx.constraintlayout.widget.ConstraintLayout
+    xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    android:id="@+id/input_pad"
+    style="@style/PadLayoutStyle"
+    android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:background="?colorSurface">
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/clr"
+        style="@style/PadButtonStyle.Caps"
+        android:contentDescription="@string/desc_clr"
+        android:text="@string/clr"
+        android:theme="@style/Theme.Button.Clear"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/paren"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_paren"
+        android:text="@string/paren"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toStartOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/lparen"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_lparen"
+        android:text="@string/lparen"
+        android:theme="@style/Theme.Button.Operator"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toStartOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/rparen"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_rparen"
+        android:text="@string/rparen"
+        android:theme="@style/Theme.Button.Operator"
+        android:visibility="gone"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toStartOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_pct"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_pct"
+        android:text="@string/op_pct"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_div"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_div"
+        android:text="@string/op_div"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide1"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toTopOf="parent" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_7"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_7"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_8"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_8"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_9"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_9"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide2"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_mul"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_mul"
+        android:text="@string/op_mul"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide2"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide1" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_4"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_4"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toTopOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_5"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_5"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toTopOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_6"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_6"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide3"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toTopOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_sub"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_sub"
+        android:text="@string/op_sub"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide3"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toTopOf="@id/rowGuide2" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_1"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_1"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide4"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_2"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_2"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="@id/rowGuide4"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_3"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_3"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide4"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/op_add"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_op_add"
+        android:text="@string/op_add"
+        android:theme="@style/Theme.Button.Operator"
+        app:layout_constraintBottom_toTopOf="@id/rowGuide4"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide3" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/dec_point"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_dec_point"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide1"
+        app:layout_constraintStart_toStartOf="parent"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide4" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/digit_0"
+        style="@style/PadButtonStyle"
+        android:text="@string/digit_0"
+        android:theme="@style/Theme.Button.Numeric"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide2"
+        app:layout_constraintStart_toEndOf="@id/columnGuide1"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide4" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/del"
+        style="@style/PadButtonStyle.Image"
+        android:contentDescription="@string/desc_del"
+        android:theme="@style/Theme.Button.Numeric"
+        app:icon="@drawable/ic_del"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toStartOf="@id/columnGuide3"
+        app:layout_constraintStart_toEndOf="@id/columnGuide2"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide4" />
+
+    <com.android.calculator2.HapticButton
+        android:id="@+id/eq"
+        style="@style/PadButtonStyle"
+        android:contentDescription="@string/desc_eq"
+        android:text="@string/eq"
+        android:theme="@style/Theme.Button.Action"
+        app:layout_constraintBottom_toBottomOf="parent"
+        app:layout_constraintEnd_toEndOf="parent"
+        app:layout_constraintStart_toEndOf="@id/columnGuide3"
+        app:layout_constraintTop_toBottomOf="@id/rowGuide4" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.25" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.5" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/columnGuide3"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="vertical"
+        app:layout_constraintGuide_percent="0.75" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide1"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.20" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide2"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.4" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide3"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.6" />
+
+    <androidx.constraintlayout.widget.Guideline
+        android:id="@+id/rowGuide4"
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:orientation="horizontal"
+        app:layout_constraintGuide_percent="0.8" />
+
+</androidx.constraintlayout.widget.ConstraintLayout>
diff --git a/res/layout/pad_advanced_3x4.xml b/res/layout/pad_advanced_3x4.xml
deleted file mode 100644
index 85c42bc..0000000
--- a/res/layout/pad_advanced_3x4.xml
+++ /dev/null
@@ -1,200 +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.
-  -->
-
-<androidx.gridlayout.widget.GridLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/pad_advanced"
-    style="@style/PadLayoutStyle.Advanced"
-    app:rowCount="4"
-    app:columnCount="3">
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/toggle_mode"
-        style="@style/PadButtonStyle.SmallCaps"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_switch_deg"
-        android:text="@string/mode_deg"
-        app:layout_row="0"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_sqrt"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_op_sqrt"
-        android:text="@string/op_sqrt"
-        app:layout_row="0"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_sqr"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_op_sqr"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/op_sqr"
-        android:visibility="gone"
-        app:layout_row="0"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/const_pi"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_const_pi"
-        android:text="@string/const_pi"
-        app:layout_row="0"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/toggle_inv"
-        style="@style/PadButtonStyle.SmallCaps"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_inv_off"
-        android:text="@string/inv"
-        app:layout_row="1"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_pow"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_op_pow"
-        android:text="@string/op_pow"
-        app:layout_row="1"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_fact"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_op_fact"
-        android:text="@string/op_fact"
-        app:layout_row="1"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_sin"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_sin"
-        android:text="@string/fun_sin"
-        app:layout_row="2"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_arcsin"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_arcsin"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_arcsin"
-        android:visibility="gone"
-        app:layout_row="2"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_cos"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_cos"
-        android:text="@string/fun_cos"
-        app:layout_row="2"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_arccos"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_arccos"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_arccos"
-        android:visibility="gone"
-        app:layout_row="2"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_tan"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_tan"
-        android:text="@string/fun_tan"
-        app:layout_row="2"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_arctan"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_arctan"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_arctan"
-        android:visibility="gone"
-        app:layout_row="2"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/const_e"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_const_e"
-        android:text="@string/const_e"
-        app:layout_row="3"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_ln"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_ln"
-        android:text="@string/fun_ln"
-        app:layout_row="3"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_exp"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_exp"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_exp"
-        android:visibility="gone"
-        app:layout_row="3"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_log"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_log"
-        android:text="@string/fun_log"
-        app:layout_row="3"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_10pow"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_10pow"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_10pow"
-        android:visibility="gone"
-        app:layout_row="3"
-        app:layout_column="2" />
-
-</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_advanced_4x3.xml b/res/layout/pad_advanced_4x3.xml
deleted file mode 100644
index 44861e1..0000000
--- a/res/layout/pad_advanced_4x3.xml
+++ /dev/null
@@ -1,200 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2015 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.
-  -->
-
-<androidx.gridlayout.widget.GridLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/pad_advanced"
-    style="@style/PadLayoutStyle.Advanced"
-    app:rowCount="3"
-    app:columnCount="4">
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_sqrt"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_op_sqrt"
-        android:text="@string/op_sqrt"
-        app:layout_row="0"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_sqr"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_op_sqr"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/op_sqr"
-        android:visibility="gone"
-        app:layout_row="0"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/const_pi"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_const_pi"
-        android:text="@string/const_pi"
-        app:layout_row="0"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_pow"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_op_pow"
-        android:text="@string/op_pow"
-        app:layout_row="0"
-        app:layout_column="2" /> 
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_fact"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_op_fact"
-        android:text="@string/op_fact"
-        app:layout_row="0"
-        app:layout_column="3" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/toggle_mode"
-        style="@style/PadButtonStyle.SmallCaps"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_switch_deg"
-        android:text="@string/mode_deg"
-        app:layout_row="1"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_sin"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_sin"
-        android:text="@string/fun_sin"
-        app:layout_row="1"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_arcsin"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_arcsin"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_arcsin"
-        android:visibility="gone"
-        app:layout_row="1"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_cos"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_cos"
-        android:text="@string/fun_cos"
-        app:layout_row="1"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_arccos"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_arccos"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_arccos"
-        android:visibility="gone"
-        app:layout_row="1"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_tan"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_tan"
-        android:text="@string/fun_tan"
-        app:layout_row="1"
-        app:layout_column="3" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_arctan"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_arctan"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_arctan"
-        android:visibility="gone"
-        app:layout_row="1"
-        app:layout_column="3" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/toggle_inv"
-        style="@style/PadButtonStyle.SmallCaps"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_inv_off"
-        android:text="@string/inv"
-        app:layout_row="2"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/const_e"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_const_e"
-        android:text="@string/const_e"
-        app:layout_row="2"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_ln"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_ln"
-        android:text="@string/fun_ln"
-        app:layout_row="2"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_exp"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_exp"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_exp"
-        android:visibility="gone"
-        app:layout_row="2"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_log"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_log"
-        android:text="@string/fun_log"
-        app:layout_row="2"
-        app:layout_column="3" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/fun_10pow"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Advanced"
-        android:contentDescription="@string/desc_fun_10pow"
-        android:fontFamily="sans-serif-medium"
-        android:text="@string/fun_10pow"
-        android:visibility="gone"
-        app:layout_row="2"
-        app:layout_column="3" />
-
-</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_numeric.xml b/res/layout/pad_numeric.xml
deleted file mode 100644
index 35206ac..0000000
--- a/res/layout/pad_numeric.xml
+++ /dev/null
@@ -1,123 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2014 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.
-  -->
-
-<androidx.gridlayout.widget.GridLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/pad_numeric"
-    style="@style/PadLayoutStyle.Numeric"
-    app:rowCount="4"
-    app:columnCount="3">
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_7"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_7"
-        app:layout_row="0"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_8"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_8"
-        app:layout_row="0"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_9"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_9"
-        app:layout_row="0"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_4"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_4"
-        app:layout_row="1"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_5"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_5"
-        app:layout_row="1"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_6"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_6"
-        app:layout_row="1"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_1"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_1"
-        app:layout_row="2"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_2"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_2"
-        app:layout_row="2"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_3"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_3"
-        app:layout_row="2"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/dec_point"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:contentDescription="@string/desc_dec_point"
-        app:layout_row="3"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/digit_0"
-        style="@style/PadButtonStyle"
-        android:theme="@style/Theme.Button.Numeric"
-        android:text="@string/digit_0"
-        app:layout_row="3"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/del"
-        style="@style/PadButtonStyle.Image"
-        android:theme="@style/Theme.Button.Numeric"
-        android:contentDescription="@string/desc_del"
-        app:icon="@drawable/ic_del"
-        app:layout_row="3"
-        app:layout_column="2" />
-
-</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_operator_one_col.xml b/res/layout/pad_operator_one_col.xml
deleted file mode 100644
index 9543dfd..0000000
--- a/res/layout/pad_operator_one_col.xml
+++ /dev/null
@@ -1,62 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2014 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.
-  -->
-
-<androidx.gridlayout.widget.GridLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/pad_operator"
-    style="@style/PadLayoutStyle.Operator"
-    app:rowCount="4"
-    app:columnCount="1">
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_mul"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_op_mul"
-        android:text="@string/op_mul"
-        app:layout_row="0"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_sub"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_op_sub"
-        android:text="@string/op_sub"
-        app:layout_row="1"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_add"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_op_add"
-        android:text="@string/op_add"
-        app:layout_row="2"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/eq"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Action"
-        android:contentDescription="@string/desc_eq"
-        android:text="@string/eq"
-        app:layout_row="3"
-        app:layout_column="0" />
-
-</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_operator_one_col_aux.xml b/res/layout/pad_operator_one_col_aux.xml
deleted file mode 100644
index c26b4e6..0000000
--- a/res/layout/pad_operator_one_col_aux.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-     SPDX-FileCopyrightText: 2023 The LineageOS Project
-     SPDX-License-Identifier: Apache-2.0
--->
-<androidx.gridlayout.widget.GridLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/pad_operator_aux"
-    style="@style/PadLayoutStyle.OperatorAux"
-    app:rowCount="1"
-    app:columnCount="4">
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/clr"
-        style="@style/PadButtonStyle.Caps"
-        android:theme="@style/Theme.Button.Clear"
-        android:contentDescription="@string/desc_clr"
-        android:text="@string/clr"
-        app:layout_row="0"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/paren"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_paren"
-        android:text="@string/paren"
-        app:layout_row="0"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/lparen"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_lparen"
-        android:text="@string/lparen"
-        android:visibility="gone"
-        app:layout_row="0"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/rparen"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_rparen"
-        android:text="@string/rparen"
-        android:visibility="gone"
-        app:layout_row="0"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_pct"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_op_pct"
-        android:text="@string/op_pct"
-        app:layout_row="0"
-        app:layout_column="2" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_div"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_op_div"
-        android:text="@string/op_div"
-        app:layout_row="0"
-        app:layout_column="3" />
-
-</androidx.gridlayout.widget.GridLayout>
diff --git a/res/layout/pad_operator_two_col.xml b/res/layout/pad_operator_two_col.xml
deleted file mode 100644
index 3027f63..0000000
--- a/res/layout/pad_operator_two_col.xml
+++ /dev/null
@@ -1,118 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!--
-  Copyright (C) 2014 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.
-  -->
-
-<androidx.gridlayout.widget.GridLayout
-    xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    android:id="@+id/pad_operator"
-    style="@style/PadLayoutStyle.Operator"
-    app:rowCount="4"
-    app:columnCount="2">
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_div"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_op_div"
-        android:text="@string/op_div"
-        app:layout_row="0"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/clr"
-        style="@style/PadButtonStyle.Caps"
-        android:theme="@style/Theme.Button.Clear"
-        android:contentDescription="@string/desc_clr"
-        android:text="@string/clr"
-        app:layout_row="0"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_mul"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/op_mul"
-        android:text="@string/op_mul"
-        app:layout_row="1"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/paren"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_paren"
-        android:text="@string/paren"
-        app:layout_row="1"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/lparen"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_lparen"
-        android:text="@string/lparen"
-        android:visibility="gone"
-        app:layout_row="1"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/rparen"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_rparen"
-        android:text="@string/rparen"
-        android:visibility="gone"
-        app:layout_row="1"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_sub"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_op_sub"
-        android:text="@string/op_sub"
-        app:layout_row="2"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_pct"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_op_pct"
-        android:text="@string/op_pct"
-        app:layout_row="2"
-        app:layout_column="1" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/op_add"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Operator"
-        android:contentDescription="@string/desc_op_add"
-        android:text="@string/op_add"
-        app:layout_row="3"
-        app:layout_column="0" />
-
-    <com.android.calculator2.HapticButton
-        android:id="@+id/eq"
-        style="@style/PadButtonStyle.SmallText"
-        android:theme="@style/Theme.Button.Action"
-        android:contentDescription="@string/desc_eq"
-        android:text="@string/eq"
-        app:layout_row="3"
-        app:layout_column="1" />
-
-</androidx.gridlayout.widget.GridLayout>
diff --git a/res/values-land/styles.xml b/res/values-land/styles.xml
index 7fd6d05..47c583f 100644
--- a/res/values-land/styles.xml
+++ b/res/values-land/styles.xml
@@ -22,7 +22,7 @@
         <item name="android:layout_height">0dip</item>
         <item name="android:gravity">center</item>
         <item name="android:includeFontPadding">false</item>
-        <item name="android:textSize">22dip</item>
+        <item name="android:textSize">22sp</item>
         <item name="android:onClick">onButtonClick</item>
         <item name="android:fontFeatureSettings">tnum, cv03, cv04</item>
         <item name="android:layout_marginHorizontal">4dp</item>
@@ -36,37 +36,24 @@
 
     <style name="PadButtonStyle.SmallCaps">
         <item name="textAllCaps">true</item>
-        <item name="android:textSize">12dip</item>
+        <item name="android:textSize">12sp</item>
     </style>
 
     <style name="PadButtonStyle.SmallText">
-        <item name="android:textSize">14dip</item>
+        <item name="android:textSize">14sp</item>
+    </style>
+
+    <style name="PadLayoutStyle">
+        <item name="android:paddingTop">8dip</item>
+        <item name="android:paddingBottom">8dip</item>
+        <item name="android:paddingStart">8dip</item>
+        <item name="android:paddingEnd">12dip</item>
     </style>
 
     <style name="PadLayoutStyle.Advanced">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">150</item>
         <item name="android:paddingTop">8dip</item>
         <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">12dip</item>
-        <item name="android:paddingEnd">12dip</item>
-    </style>
-
-    <style name="PadLayoutStyle.Numeric">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">200</item>
-        <item name="android:paddingTop">8dip</item>
-        <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">12dip</item>
-        <item name="android:paddingEnd">12dip</item>
-    </style>
-
-    <style name="PadLayoutStyle.Operator">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">125</item>
-        <item name="android:paddingTop">8dip</item>
-        <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">12dip</item>
+        <item name="android:paddingStart">8dip</item>
         <item name="android:paddingEnd">12dip</item>
     </style>
 
diff --git a/res/values-sw600dp-land/styles.xml b/res/values-sw600dp-land/styles.xml
index b6feb8e..420114b 100644
--- a/res/values-sw600dp-land/styles.xml
+++ b/res/values-sw600dp-land/styles.xml
@@ -17,27 +17,14 @@
 
 <resources xmlns:android="http://schemas.android.com/apk/res/android">
 
+    <style name="PadLayoutStyle">
+        <item name="android:paddingTop">8dip</item>
+        <item name="android:paddingBottom">8dip</item>
+        <item name="android:paddingStart">12dip</item>
+        <item name="android:paddingEnd">12dip</item>
+    </style>
+
     <style name="PadLayoutStyle.Advanced">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">100</item>
-        <item name="android:paddingTop">8dip</item>
-        <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">12dip</item>
-        <item name="android:paddingEnd">12dip</item>
-    </style>
-
-    <style name="PadLayoutStyle.Numeric">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">150</item>
-        <item name="android:paddingTop">8dip</item>
-        <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">12dip</item>
-        <item name="android:paddingEnd">12dip</item>
-    </style>
-
-    <style name="PadLayoutStyle.Operator">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">100</item>
         <item name="android:paddingTop">8dip</item>
         <item name="android:paddingBottom">8dip</item>
         <item name="android:paddingStart">12dip</item>
diff --git a/res/values-sw600dp/styles.xml b/res/values-sw600dp/styles.xml
index ab61eaa..01c8ca2 100644
--- a/res/values-sw600dp/styles.xml
+++ b/res/values-sw600dp/styles.xml
@@ -22,7 +22,7 @@
         <item name="android:layout_height">0dip</item>
         <item name="android:gravity">center</item>
         <item name="android:includeFontPadding">false</item>
-        <item name="android:textSize">46dip</item>
+        <item name="android:textSize">46sp</item>
         <item name="android:onClick">onButtonClick</item>
         <item name="android:fontFeatureSettings">tnum, cv03, cv04</item>
         <item name="android:layout_marginHorizontal">4dp</item>
@@ -36,47 +36,25 @@
 
     <style name="PadButtonStyle.SmallCaps">
         <item name="textAllCaps">true</item>
-        <item name="android:textSize">32dip</item>
+        <item name="android:textSize">28sp</item>
     </style>
 
     <style name="PadButtonStyle.SmallText">
-        <item name="android:textSize">36dip</item>
+        <item name="android:textSize">32sp</item>
+    </style>
+
+    <style name="PadLayoutStyle">
+        <item name="android:paddingTop">8dip</item>
+        <item name="android:paddingBottom">16dip</item>
+        <item name="android:paddingStart">16dip</item>
+        <item name="android:paddingEnd">16dip</item>
     </style>
 
     <style name="PadLayoutStyle.Advanced">
-        <item name="android:layout_height">0dip</item>
-        <item name="android:layout_weight">100</item>
-        <item name="android:paddingTop">2dip</item>
-        <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">18dip</item>
-        <item name="android:paddingEnd">18dip</item>
-    </style>
-
-	<style name="PadLayoutStyle.OperatorAux">
-        <item name="android:layout_height">0dip</item>
-        <item name="android:layout_weight">200</item>
         <item name="android:paddingTop">8dip</item>
-        <item name="android:paddingBottom">0dip</item>
-        <item name="android:paddingStart">8dip</item>
-        <item name="android:paddingEnd">8dip</item>
-    </style>
-
-    <style name="PadLayoutStyle.Numeric">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">750</item>
-        <item name="android:paddingTop">0dip</item>
         <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">8dip</item>
-        <item name="android:paddingEnd">0dip</item>
-    </style>
-
-    <style name="PadLayoutStyle.Operator">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">250</item>
-        <item name="android:paddingTop">0dip</item>
-        <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">0dip</item>
-        <item name="android:paddingEnd">8dip</item>
+        <item name="android:paddingStart">16dip</item>
+        <item name="android:paddingEnd">16dip</item>
     </style>
 
 </resources>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 3bf365a..8bef02e 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -63,13 +63,10 @@
         <item name="android:layout_height">0dip</item>
         <item name="android:gravity">center</item>
         <item name="android:includeFontPadding">false</item>
-        <item name="android:textSize">32dip</item>
+        <item name="android:textSize">32sp</item>
         <item name="android:onClick">onButtonClick</item>
         <item name="android:fontFeatureSettings">tnum, cv03, cv04</item>
-
-        <!-- Attributes from androidx.appcompat.gridlayout -->
-        <item name="layout_rowWeight">1</item>
-        <item name="layout_columnWeight">1</item>
+        <item name="android:layout_marginHorizontal">4dp</item>
     </style>
 
     <style name="PadButtonStyle.Caps">
@@ -84,52 +81,26 @@
 
     <style name="PadButtonStyle.SmallCaps">
         <item name="textAllCaps">true</item>
-        <item name="android:textSize">18dip</item>
+        <item name="android:textSize">16sp</item>
     </style>
 
     <style name="PadButtonStyle.SmallText">
-        <item name="android:textSize">22dip</item>
+        <item name="android:textSize">18sp</item>
+        <item name="android:layout_marginHorizontal">2dp</item>
     </style>
 
     <style name="PadLayoutStyle">
-        <item name="android:layout_width">match_parent</item>
-        <item name="android:layout_height">match_parent</item>
+        <item name="android:paddingTop">8dip</item>
+        <item name="android:paddingBottom">8dip</item>
+        <item name="android:paddingStart">8dip</item>
+        <item name="android:paddingEnd">8dip</item>
     </style>
 
     <style name="PadLayoutStyle.Advanced">
-        <item name="android:layout_height">0dip</item>
-        <item name="android:layout_weight">100</item>
-        <item name="android:paddingTop">2dip</item>
-        <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">18dip</item>
-        <item name="android:paddingEnd">18dip</item>
-    </style>
-
-	<style name="PadLayoutStyle.OperatorAux">
-        <item name="android:layout_height">0dip</item>
-        <item name="android:layout_weight">200</item>
         <item name="android:paddingTop">8dip</item>
-        <item name="android:paddingBottom">0dip</item>
-        <item name="android:paddingStart">8dip</item>
-        <item name="android:paddingEnd">8dip</item>
-    </style>
-
-    <style name="PadLayoutStyle.Numeric">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">750</item>
-        <item name="android:paddingTop">0dip</item>
         <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">8dip</item>
-        <item name="android:paddingEnd">0dip</item>
-    </style>
-
-    <style name="PadLayoutStyle.Operator">
-        <item name="android:layout_width">0dip</item>
-        <item name="android:layout_weight">250</item>
-        <item name="android:paddingTop">0dip</item>
-        <item name="android:paddingBottom">8dip</item>
-        <item name="android:paddingStart">0dip</item>
-        <item name="android:paddingEnd">8dip</item>
+        <item name="android:paddingStart">16dip</item>
+        <item name="android:paddingEnd">16dip</item>
     </style>
 
 </resources>
diff --git a/src/com/android/calculator2/Calculator.java b/src/com/android/calculator2/Calculator.java
index cda4f3e..3fcf0af 100644
--- a/src/com/android/calculator2/Calculator.java
+++ b/src/com/android/calculator2/Calculator.java
@@ -350,9 +350,8 @@
         mResultText.setEvaluator(mEvaluator, Evaluator.MAIN_INDEX);
         KeyMaps.setActivity(this);
 
-        final View numberPad = findViewById(R.id.pad_numeric);
-        final TextView decimalPointButton = (TextView) numberPad.findViewById(R.id.dec_point);
-        decimalPointButton.setText(getDecimalSeparator());
+        final TextView dpButton = findViewById(R.id.input_pad).findViewById(R.id.dec_point);
+        dpButton.setText(getDecimalSeparator());
 
         mInverseToggle = (TextView) findViewById(R.id.toggle_inv);
         mModeToggle = (TextView) findViewById(R.id.toggle_mode);