From 9596488b77de3e0e2caacc18be55a386c90025dd Mon Sep 17 00:00:00 2001 From: Sad Ellie Date: Fri, 26 Jan 2024 23:38:07 +0300 Subject: [PATCH] I LOVE Android View system Rewriting Linux kernel in brainfuck is more satisfying than doing anything in Android View System - Added preview and initial layout for calculator widget closes #156 --- .../res/layout/calculator_placeholder.xml | 375 ++++++++++++++++++ .../res/layout/default_initial_layout.xml | 30 ++ .../src/main/res/values-night-v34/colors.xml | 30 ++ .../src/main/res/values-night/colors.xml | 30 ++ .../glance/src/main/res/values-v34/colors.xml | 30 ++ feature/glance/src/main/res/values/colors.xml | 30 ++ .../res/xml/unitto_calculator_widget_info.xml | 7 +- 7 files changed, 529 insertions(+), 3 deletions(-) create mode 100644 feature/glance/src/main/res/layout/calculator_placeholder.xml create mode 100644 feature/glance/src/main/res/layout/default_initial_layout.xml create mode 100644 feature/glance/src/main/res/values-night-v34/colors.xml create mode 100644 feature/glance/src/main/res/values-night/colors.xml create mode 100644 feature/glance/src/main/res/values-v34/colors.xml create mode 100644 feature/glance/src/main/res/values/colors.xml diff --git a/feature/glance/src/main/res/layout/calculator_placeholder.xml b/feature/glance/src/main/res/layout/calculator_placeholder.xml new file mode 100644 index 00000000..3bc93130 --- /dev/null +++ b/feature/glance/src/main/res/layout/calculator_placeholder.xml @@ -0,0 +1,375 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/feature/glance/src/main/res/layout/default_initial_layout.xml b/feature/glance/src/main/res/layout/default_initial_layout.xml new file mode 100644 index 00000000..1d7d2137 --- /dev/null +++ b/feature/glance/src/main/res/layout/default_initial_layout.xml @@ -0,0 +1,30 @@ + + + + + + diff --git a/feature/glance/src/main/res/values-night-v34/colors.xml b/feature/glance/src/main/res/values-night-v34/colors.xml new file mode 100644 index 00000000..104b556a --- /dev/null +++ b/feature/glance/src/main/res/values-night-v34/colors.xml @@ -0,0 +1,30 @@ + + + + @android:color/system_primary_dark + @android:color/system_on_primary_dark + @android:color/system_tertiary_container_dark + @android:color/system_on_tertiary_container_dark + @android:color/system_primary_container_dark + @android:color/system_on_primary_container_dark + @android:color/system_surface_variant_dark + @android:color/system_on_surface_variant_dark + @android:color/system_background_dark + @android:color/system_surface_container_highest_dark + diff --git a/feature/glance/src/main/res/values-night/colors.xml b/feature/glance/src/main/res/values-night/colors.xml new file mode 100644 index 00000000..6011bad0 --- /dev/null +++ b/feature/glance/src/main/res/values-night/colors.xml @@ -0,0 +1,30 @@ + + + + #87d991 + #003911 + #1f4d54 + #bceaf3 + #00531d + #a3f6ab + #414940 + #c1c9be + #161616 + #1a1c19 + diff --git a/feature/glance/src/main/res/values-v34/colors.xml b/feature/glance/src/main/res/values-v34/colors.xml new file mode 100644 index 00000000..effbd52e --- /dev/null +++ b/feature/glance/src/main/res/values-v34/colors.xml @@ -0,0 +1,30 @@ + + + + @android:color/system_primary_light + @android:color/system_on_primary_light + @android:color/system_tertiary_container_light + @android:color/system_on_tertiary_container_light + @android:color/system_primary_container_light + @android:color/system_on_primary_container_light + @android:color/system_surface_variant_light + @android:color/system_on_surface_variant_light + @android:color/system_background_light + @android:color/system_text_primary_inverse_light + diff --git a/feature/glance/src/main/res/values/colors.xml b/feature/glance/src/main/res/values/colors.xml new file mode 100644 index 00000000..d106d3f6 --- /dev/null +++ b/feature/glance/src/main/res/values/colors.xml @@ -0,0 +1,30 @@ + + + + #186c31 + #ffffff + #bceaf3 + #001f24 + #a3f6ab + #002107 + #dde5d9 + #414940 + #ffffff + #f0f1eb + diff --git a/feature/glance/src/main/res/xml/unitto_calculator_widget_info.xml b/feature/glance/src/main/res/xml/unitto_calculator_widget_info.xml index eaeb0755..32437c4e 100644 --- a/feature/glance/src/main/res/xml/unitto_calculator_widget_info.xml +++ b/feature/glance/src/main/res/xml/unitto_calculator_widget_info.xml @@ -19,11 +19,12 @@ \ No newline at end of file