From cc5a13db24f109e5babaec3e1930516733f0ccea Mon Sep 17 00:00:00 2001 From: Nishith Khanna Date: Tue, 14 Mar 2023 19:04:08 +0530 Subject: [PATCH] Improve ui of calculator and fix issue in high dpi screens --- res/drawable/ic_del.xml | 19 +- res/layout-land/pad_advanced_3x5.xml | 66 ++---- res/layout/activity_calculator_land.xml | 3 +- res/layout/activity_calculator_port.xml | 3 +- .../activity_calculator_tablet_port.xml | 3 +- res/layout/pad_advanced_3x5.xml | 66 ++---- res/layout/pad_main.xml | 191 ++++++++++++++++++ res/layout/pad_numeric.xml | 112 ---------- res/values-w230dp-h275dp/layout.xml | 3 +- res/values-w230dp-h375dp/layout.xml | 3 +- res/values-w230dp-h475dp-port/layout.xml | 1 - res/values-w375dp-h220dp/layout.xml | 3 +- res/values-w375dp-h275dp/layout.xml | 3 +- res/values-w375dp-h375dp/layout.xml | 3 +- res/values-w375dp-h500dp-port/layout.xml | 1 - res/values-w375dp-h768dp-port/layout.xml | 5 +- res/values-w375dp-h768dp-port/styles.xml | 3 +- res/values-w520dp-h220dp-land/layout.xml | 3 +- res/values-w520dp-h275dp-land/layout.xml | 1 - res/values-w520dp-h375dp-land/layout.xml | 1 - res/values-w520dp-h500dp-land/layout.xml | 1 - res/values-w520dp-h768dp-land/layout.xml | 1 - res/values-w520dp-h768dp-port/layout.xml | 5 +- res/values-w520dp-h768dp-port/styles.xml | 3 +- res/values/layout.xml | 3 +- res/values/styles.xml | 15 ++ 26 files changed, 272 insertions(+), 249 deletions(-) create mode 100644 res/layout/pad_main.xml delete mode 100644 res/layout/pad_numeric.xml diff --git a/res/drawable/ic_del.xml b/res/drawable/ic_del.xml index 14691140..716c62ea 100644 --- a/res/drawable/ic_del.xml +++ b/res/drawable/ic_del.xml @@ -14,16 +14,13 @@ See the License for the specific language governing permissions and limitations under the License. --> - - + android:height="24dp" + android:viewportWidth="24" + android:viewportHeight="24"> + + diff --git a/res/layout-land/pad_advanced_3x5.xml b/res/layout-land/pad_advanced_3x5.xml index dfd283d5..c17548b0 100644 --- a/res/layout-land/pad_advanced_3x5.xml +++ b/res/layout-land/pad_advanced_3x5.xml @@ -21,12 +21,12 @@ android:id="@+id/pad_advanced" style="@style/PadLayoutStyle.Advanced" android:background="@color/pad_advanced_background_color" - app:rowCount="5" + app:rowCount="4" app:columnCount="3"> - - - - - - diff --git a/res/layout/activity_calculator_land.xml b/res/layout/activity_calculator_land.xml index 5a487e32..8fc54ed0 100644 --- a/res/layout/activity_calculator_land.xml +++ b/res/layout/activity_calculator_land.xml @@ -36,8 +36,7 @@ android:layout_height="0dip" android:layout_weight="1"> - - + diff --git a/res/layout/activity_calculator_port.xml b/res/layout/activity_calculator_port.xml index fb62c53b..f935b964 100644 --- a/res/layout/activity_calculator_port.xml +++ b/res/layout/activity_calculator_port.xml @@ -39,8 +39,7 @@ android:layout_width="match_parent" android:layout_height="match_parent"> - - + diff --git a/res/layout/activity_calculator_tablet_port.xml b/res/layout/activity_calculator_tablet_port.xml index a5cd80e6..57e93063 100644 --- a/res/layout/activity_calculator_tablet_port.xml +++ b/res/layout/activity_calculator_tablet_port.xml @@ -35,8 +35,7 @@ android:layout_height="0dip" android:layout_weight="500"> - - + diff --git a/res/layout/pad_advanced_3x5.xml b/res/layout/pad_advanced_3x5.xml index 4bdef5ff..c37057ee 100644 --- a/res/layout/pad_advanced_3x5.xml +++ b/res/layout/pad_advanced_3x5.xml @@ -32,12 +32,12 @@ - - - - - - diff --git a/res/layout/pad_main.xml b/res/layout/pad_main.xml new file mode 100644 index 00000000..14801e59 --- /dev/null +++ b/res/layout/pad_main.xml @@ -0,0 +1,191 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/res/layout/pad_numeric.xml b/res/layout/pad_numeric.xml deleted file mode 100644 index cfe308b1..00000000 --- a/res/layout/pad_numeric.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/res/values-w230dp-h275dp/layout.xml b/res/values-w230dp-h275dp/layout.xml index f9a2d970..07752d7d 100644 --- a/res/values-w230dp-h275dp/layout.xml +++ b/res/values-w230dp-h275dp/layout.xml @@ -18,6 +18,5 @@ @layout/activity_calculator_port @layout/display_two_line - @layout/pad_operator_one_col - @layout/pad_advanced_4x4 + @layout/pad_advanced_3x5 diff --git a/res/values-w230dp-h375dp/layout.xml b/res/values-w230dp-h375dp/layout.xml index f9a2d970..07752d7d 100644 --- a/res/values-w230dp-h375dp/layout.xml +++ b/res/values-w230dp-h375dp/layout.xml @@ -18,6 +18,5 @@ @layout/activity_calculator_port @layout/display_two_line - @layout/pad_operator_one_col - @layout/pad_advanced_4x4 + @layout/pad_advanced_3x5 diff --git a/res/values-w230dp-h475dp-port/layout.xml b/res/values-w230dp-h475dp-port/layout.xml index 9f7bd6bb..07752d7d 100644 --- a/res/values-w230dp-h475dp-port/layout.xml +++ b/res/values-w230dp-h475dp-port/layout.xml @@ -18,6 +18,5 @@ @layout/activity_calculator_port @layout/display_two_line - @layout/pad_operator_one_col @layout/pad_advanced_3x5 diff --git a/res/values-w375dp-h220dp/layout.xml b/res/values-w375dp-h220dp/layout.xml index ac4cde83..611e2fa2 100644 --- a/res/values-w375dp-h220dp/layout.xml +++ b/res/values-w375dp-h220dp/layout.xml @@ -18,6 +18,5 @@ @layout/activity_calculator_port @layout/display_one_line - @layout/pad_operator_two_col - @layout/pad_advanced_4x4 + @layout/pad_advanced_3x5 diff --git a/res/values-w375dp-h275dp/layout.xml b/res/values-w375dp-h275dp/layout.xml index 3890667a..07752d7d 100644 --- a/res/values-w375dp-h275dp/layout.xml +++ b/res/values-w375dp-h275dp/layout.xml @@ -18,6 +18,5 @@ @layout/activity_calculator_port @layout/display_two_line - @layout/pad_operator_two_col - @layout/pad_advanced_4x4 + @layout/pad_advanced_3x5 diff --git a/res/values-w375dp-h375dp/layout.xml b/res/values-w375dp-h375dp/layout.xml index 3890667a..07752d7d 100644 --- a/res/values-w375dp-h375dp/layout.xml +++ b/res/values-w375dp-h375dp/layout.xml @@ -18,6 +18,5 @@ @layout/activity_calculator_port @layout/display_two_line - @layout/pad_operator_two_col - @layout/pad_advanced_4x4 + @layout/pad_advanced_3x5 diff --git a/res/values-w375dp-h500dp-port/layout.xml b/res/values-w375dp-h500dp-port/layout.xml index 9f7bd6bb..07752d7d 100644 --- a/res/values-w375dp-h500dp-port/layout.xml +++ b/res/values-w375dp-h500dp-port/layout.xml @@ -18,6 +18,5 @@ @layout/activity_calculator_port @layout/display_two_line - @layout/pad_operator_one_col @layout/pad_advanced_3x5 diff --git a/res/values-w375dp-h768dp-port/layout.xml b/res/values-w375dp-h768dp-port/layout.xml index 98db0fee..07752d7d 100644 --- a/res/values-w375dp-h768dp-port/layout.xml +++ b/res/values-w375dp-h768dp-port/layout.xml @@ -16,8 +16,7 @@ --> - @layout/activity_calculator_tablet_port + @layout/activity_calculator_port @layout/display_two_line - @layout/pad_advanced_5x3 - @layout/pad_operator_two_col + @layout/pad_advanced_3x5 diff --git a/res/values-w375dp-h768dp-port/styles.xml b/res/values-w375dp-h768dp-port/styles.xml index 2c5ae357..b8caea0b 100644 --- a/res/values-w375dp-h768dp-port/styles.xml +++ b/res/values-w375dp-h768dp-port/styles.xml @@ -46,8 +46,7 @@ + + + + + + -- GitLab