From 122e2f7a8e33617546a762637e891129b9b9f857 Mon Sep 17 00:00:00 2001 From: Viktor De Pasquale Date: Mon, 30 Sep 2019 19:37:57 +0200 Subject: [PATCH] Updated styles and simplified dimension usage --- .../main/res/color/color_error_transient.xml | 5 + .../res/color/color_primary_transient.xml | 5 + .../main/res/color/color_text_transient.xml | 5 + app/src/main/res/drawable/bg_circle.xml | 14 -- app/src/main/res/drawable/bg_divider_top.xml | 21 --- app/src/main/res/drawable/ic_delete_md2.xml | 10 ++ app/src/main/res/drawable/ic_home.xml | 10 ++ app/src/main/res/drawable/ic_install.xml | 10 ++ app/src/main/res/drawable/ic_update_md2.xml | 10 ++ app/src/main/res/layout/test.xml | 155 +++++++++++------- app/src/main/res/menu/menu_bottom_nav.xml | 8 +- app/src/main/res/values/attrs.xml | 54 +++--- app/src/main/res/values/dimens.xml | 10 +- app/src/main/res/values/styles_md2.xml | 25 +-- .../main/res/values/styles_md2_appearance.xml | 11 +- app/src/main/res/values/styles_md2_impl.xml | 33 +++- 16 files changed, 237 insertions(+), 149 deletions(-) create mode 100644 app/src/main/res/color/color_error_transient.xml create mode 100644 app/src/main/res/color/color_primary_transient.xml create mode 100644 app/src/main/res/color/color_text_transient.xml delete mode 100644 app/src/main/res/drawable/bg_circle.xml delete mode 100644 app/src/main/res/drawable/bg_divider_top.xml create mode 100644 app/src/main/res/drawable/ic_delete_md2.xml create mode 100644 app/src/main/res/drawable/ic_home.xml create mode 100644 app/src/main/res/drawable/ic_install.xml create mode 100644 app/src/main/res/drawable/ic_update_md2.xml diff --git a/app/src/main/res/color/color_error_transient.xml b/app/src/main/res/color/color_error_transient.xml new file mode 100644 index 000000000..22fd9491c --- /dev/null +++ b/app/src/main/res/color/color_error_transient.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/color/color_primary_transient.xml b/app/src/main/res/color/color_primary_transient.xml new file mode 100644 index 000000000..b792af898 --- /dev/null +++ b/app/src/main/res/color/color_primary_transient.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/color/color_text_transient.xml b/app/src/main/res/color/color_text_transient.xml new file mode 100644 index 000000000..b394648cb --- /dev/null +++ b/app/src/main/res/color/color_text_transient.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/bg_circle.xml b/app/src/main/res/drawable/bg_circle.xml deleted file mode 100644 index cc79f6fdd..000000000 --- a/app/src/main/res/drawable/bg_circle.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - diff --git a/app/src/main/res/drawable/bg_divider_top.xml b/app/src/main/res/drawable/bg_divider_top.xml deleted file mode 100644 index 09e8d6a54..000000000 --- a/app/src/main/res/drawable/bg_divider_top.xml +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_delete_md2.xml b/app/src/main/res/drawable/ic_delete_md2.xml new file mode 100644 index 000000000..dd7f39908 --- /dev/null +++ b/app/src/main/res/drawable/ic_delete_md2.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_home.xml b/app/src/main/res/drawable/ic_home.xml new file mode 100644 index 000000000..90d81fbea --- /dev/null +++ b/app/src/main/res/drawable/ic_home.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_install.xml b/app/src/main/res/drawable/ic_install.xml new file mode 100644 index 000000000..9e71aa185 --- /dev/null +++ b/app/src/main/res/drawable/ic_install.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_update_md2.xml b/app/src/main/res/drawable/ic_update_md2.xml new file mode 100644 index 000000000..7595bcf4d --- /dev/null +++ b/app/src/main/res/drawable/ic_update_md2.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/layout/test.xml b/app/src/main/res/layout/test.xml index eed215ff0..bd8727526 100644 --- a/app/src/main/res/layout/test.xml +++ b/app/src/main/res/layout/test.xml @@ -10,69 +10,54 @@ style="?styleAppbar" android:layout_width="match_parent" android:layout_height="wrap_content" - android:background="@android:color/transparent"> + android:background="?colorSurfaceVariant"> - + android:layout_height="wrap_content" + android:background="@android:color/transparent" + app:contentInsetStartWithNavigation="0dp" + app:layout_constraintBottom_toBottomOf="parent" + tools:paddingTop="24dp"> - - - + android:paddingBottom="@dimen/l1"> - + android:gravity="center" + tools:text="Home" /> - + - + - - - - - + + android:layout_height="wrap_content" + android:paddingTop="@dimen/l1"> + android:text="@string/install" + app:icon="@drawable/ic_install" + app:iconGravity="textEnd" + app:iconPadding="@dimen/l_50" + app:iconSize="18dp" /> + + @@ -155,7 +160,7 @@ android:id="@+id/title1" android:layout_width="0dp" android:layout_height="wrap_content" - android:layout_marginStart="?l1" + android:layout_marginStart="@dimen/l1" android:text="Manager" android:textAppearance="?appearanceTextTitleNormal" app:layout_constraintEnd_toEndOf="parent" @@ -175,20 +180,28 @@ + android:text="@string/update" + app:icon="@drawable/ic_update_md2" + app:iconGravity="textEnd" + app:iconPadding="@dimen/l_50" + app:iconSize="18dp" /> @@ -197,17 +210,23 @@ + + + android:layout_height="wrap_content"> + android:padding="@dimen/l1"> - + app:contentInsetEnd="0dp" + app:contentInsetStart="0dp" + app:fabCradleMargin="@dimen/l_50"> - + app:layout_anchor="@+id/home_bottom_bar" + app:srcCompat="@drawable/ic_superuser" /> \ No newline at end of file diff --git a/app/src/main/res/menu/menu_bottom_nav.xml b/app/src/main/res/menu/menu_bottom_nav.xml index e7ff50f50..6cf30c32d 100644 --- a/app/src/main/res/menu/menu_bottom_nav.xml +++ b/app/src/main/res/menu/menu_bottom_nav.xml @@ -4,7 +4,7 @@ @@ -14,6 +14,12 @@ android:title="@string/modules" tools:showAsAction="always" /> + + - + - - + + - - + + - - + + - + + + + + + - + - - + + - - + + - - + + - + + + + + + + + + - - - - - - - - - diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml index 6a96e19d0..b2e012541 100644 --- a/app/src/main/res/values/dimens.xml +++ b/app/src/main/res/values/dimens.xml @@ -3,13 +3,15 @@ 2dp 16dp - - 32dp 16dp 8dp - 8dp - + 2dp + 4dp + 8dp + 12dp + 16dp + 32dp \ No newline at end of file diff --git a/app/src/main/res/values/styles_md2.xml b/app/src/main/res/values/styles_md2.xml index 43962abcd..6f6e184f4 100644 --- a/app/src/main/res/values/styles_md2.xml +++ b/app/src/main/res/values/styles_md2.xml @@ -14,17 +14,12 @@ + \ No newline at end of file diff --git a/app/src/main/res/values/styles_md2_appearance.xml b/app/src/main/res/values/styles_md2_appearance.xml index c9f08a8ca..6cc04d5a1 100644 --- a/app/src/main/res/values/styles_md2_appearance.xml +++ b/app/src/main/res/values/styles_md2_appearance.xml @@ -3,7 +3,6 @@ @@ -22,8 +21,8 @@ @@ -60,7 +58,6 @@ @@ -79,10 +76,12 @@ + + + + + + + + + + \ No newline at end of file