From 6c8972e7f7d2ff0dbf6ab0c3c4240b663c793afb Mon Sep 17 00:00:00 2001 From: lauris Date: Wed, 18 Oct 2023 13:40:17 +0300 Subject: [PATCH 1/2] Swap button Big style to default style and add a Small style for the old default style --- .../presentation/MaterialThemeActivity.kt | 8 +- .../presentation/button/ButtonFragment.kt | 8 +- .../res/layout/activity_material_theme.xml | 80 +++++----- .../src/main/res/layout/fragment_button.xml | 70 ++++----- build.gradle | 2 +- .../components/button/res/values/dimens.xml | 20 +-- .../components/button/res/values/styles.xml | 144 +++++++++--------- 7 files changed, 166 insertions(+), 166 deletions(-) diff --git a/app-demo/src/main/java/mobi/lab/components/demo/presentation/MaterialThemeActivity.kt b/app-demo/src/main/java/mobi/lab/components/demo/presentation/MaterialThemeActivity.kt index 9d5c2ff..207404c 100644 --- a/app-demo/src/main/java/mobi/lab/components/demo/presentation/MaterialThemeActivity.kt +++ b/app-demo/src/main/java/mobi/lab/components/demo/presentation/MaterialThemeActivity.kt @@ -28,13 +28,13 @@ class MaterialThemeActivity : AppCompatActivity() { private fun ActivityMaterialThemeBinding.loopButtons(action: LabButton.() -> Unit) { listOf( filled, filledIconStart, filledIconEnd, - filledBig, filledBigIconStart, filledBigIconEnd, + filledSmall, filledSmallIconStart, filledSmallIconEnd, tonal, tonalIconStart, tonalIconEnd, - tonalBig, tonalBigIconStart, tonalBigIconEnd, + tonalSmall, tonalSmallIconStart, tonalSmallIconEnd, outlined, outlinedIconStart, outlinedIconEnd, - outlinedBig, outlinedBigIconStart, outlinedBigIconEnd, + outlinedSmall, outlinedSmallIconStart, outlinedSmallIconEnd, text, textIconStart, textIconEnd, - textBig, textBigIconStart, textBigIconEnd, + textSmall, textSmallIconStart, textSmallIconEnd, ).map(action) } diff --git a/app-demo/src/main/java/mobi/lab/components/demo/presentation/button/ButtonFragment.kt b/app-demo/src/main/java/mobi/lab/components/demo/presentation/button/ButtonFragment.kt index 7c380c3..693cefd 100644 --- a/app-demo/src/main/java/mobi/lab/components/demo/presentation/button/ButtonFragment.kt +++ b/app-demo/src/main/java/mobi/lab/components/demo/presentation/button/ButtonFragment.kt @@ -23,13 +23,13 @@ class ButtonFragment : Fragment(), ViewBindingHolder by F private fun FragmentButtonBinding.loopButtons(action: LabButton.() -> Unit) { listOf( filled, filledIconStart, filledIconEnd, - filledBig, filledBigIconStart, filledBigIconEnd, + filledSmall, filledSmallIconStart, filledSmallIconEnd, tonal, tonalIconStart, tonalIconEnd, - tonalBig, tonalBigIconStart, tonalBigIconEnd, + tonalSmall, tonalSmallIconStart, tonalSmallIconEnd, outlined, outlinedIconStart, outlinedIconEnd, - outlinedBig, outlinedBigIconStart, outlinedBigIconEnd, + outlinedSmall, outlinedSmallIconStart, outlinedSmallIconEnd, text, textIconStart, textIconEnd, - textBig, textBigIconStart, textBigIconEnd, + textSmall, textSmallIconStart, textSmallIconEnd, ).map(action) } } diff --git a/app-demo/src/main/res/layout/activity_material_theme.xml b/app-demo/src/main/res/layout/activity_material_theme.xml index b785d4d..133b30c 100644 --- a/app-demo/src/main/res/layout/activity_material_theme.xml +++ b/app-demo/src/main/res/layout/activity_material_theme.xml @@ -51,7 +51,7 @@ @@ -133,7 +133,7 @@ + android:text="Tonal Small" /> @@ -206,7 +206,7 @@ + android:text="Outlined Small" /> @@ -278,7 +278,7 @@ + android:text="Text Small" /> diff --git a/app-demo/src/main/res/layout/fragment_button.xml b/app-demo/src/main/res/layout/fragment_button.xml index 9107061..4724be9 100644 --- a/app-demo/src/main/res/layout/fragment_button.xml +++ b/app-demo/src/main/res/layout/fragment_button.xml @@ -69,8 +69,8 @@ /> @@ -142,35 +142,35 @@ /> + android:text="Tonal Small" /> @@ -214,35 +214,35 @@ app:icon="@drawable/ic_placeholder16" /> + android:text="Outlined Small" /> @@ -287,35 +287,35 @@ /> + android:text="Text Small" /> diff --git a/build.gradle b/build.gradle index fad5b0e..b5cfeb9 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ plugins { ext { // Current version of the library - libraryVersion = "0.1.0" + libraryVersion = "0.0.10" } subprojects { diff --git a/lib/java/mobi/lab/components/button/res/values/dimens.xml b/lib/java/mobi/lab/components/button/res/values/dimens.xml index ca3f749..526ec89 100644 --- a/lib/java/mobi/lab/components/button/res/values/dimens.xml +++ b/lib/java/mobi/lab/components/button/res/values/dimens.xml @@ -1,15 +1,15 @@ - 8dp - 12dp + 8dp + 12dp 1dp 8dp - 36dp - 8dp - 12dp - 48dp - 12dp - 24dp - 12dp - 16dp + 48dp + 12dp + 24dp + 36dp + 8dp + 12dp + 16dp + 12dp diff --git a/lib/java/mobi/lab/components/button/res/values/styles.xml b/lib/java/mobi/lab/components/button/res/values/styles.xml index 3106de4..2878fd7 100644 --- a/lib/java/mobi/lab/components/button/res/values/styles.xml +++ b/lib/java/mobi/lab/components/button/res/values/styles.xml @@ -11,21 +11,21 @@ @null - - - - - - - - - - - - - - - -