Skip to content

Commit 144d23e

Browse files
authored
Merge pull request #3 from LabMobi/feature/default-button-style-update
Feature/default button style update
2 parents 8d24cf7 + eb1abad commit 144d23e

8 files changed

Lines changed: 173 additions & 166 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
2828

2929
- ..
3030

31+
## 0.0.10 - 2023.10.18
32+
33+
### Changed
34+
35+
- Button .Big styles are now default styles with no extra ending. For example. Widget.Lab.Button.Filled is now the same as Widget.Lab.Button.Filled used to be.
36+
- Added button .Small styles to represent the old default styles.
37+
3138
## 0.0.9 - 2023.10.17
3239

3340
### Added

app-demo/src/main/java/mobi/lab/components/demo/presentation/MaterialThemeActivity.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ class MaterialThemeActivity : AppCompatActivity() {
2828
private fun ActivityMaterialThemeBinding.loopButtons(action: LabButton.() -> Unit) {
2929
listOf(
3030
filled, filledIconStart, filledIconEnd,
31-
filledBig, filledBigIconStart, filledBigIconEnd,
31+
filledSmall, filledSmallIconStart, filledSmallIconEnd,
3232
tonal, tonalIconStart, tonalIconEnd,
33-
tonalBig, tonalBigIconStart, tonalBigIconEnd,
33+
tonalSmall, tonalSmallIconStart, tonalSmallIconEnd,
3434
outlined, outlinedIconStart, outlinedIconEnd,
35-
outlinedBig, outlinedBigIconStart, outlinedBigIconEnd,
35+
outlinedSmall, outlinedSmallIconStart, outlinedSmallIconEnd,
3636
text, textIconStart, textIconEnd,
37-
textBig, textBigIconStart, textBigIconEnd,
37+
textSmall, textSmallIconStart, textSmallIconEnd,
3838
).map(action)
3939
}
4040

app-demo/src/main/java/mobi/lab/components/demo/presentation/button/ButtonFragment.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ class ButtonFragment : Fragment(), ViewBindingHolder<FragmentButtonBinding> by F
2323
private fun FragmentButtonBinding.loopButtons(action: LabButton.() -> Unit) {
2424
listOf(
2525
filled, filledIconStart, filledIconEnd,
26-
filledBig, filledBigIconStart, filledBigIconEnd,
26+
filledSmall, filledSmallIconStart, filledSmallIconEnd,
2727
tonal, tonalIconStart, tonalIconEnd,
28-
tonalBig, tonalBigIconStart, tonalBigIconEnd,
28+
tonalSmall, tonalSmallIconStart, tonalSmallIconEnd,
2929
outlined, outlinedIconStart, outlinedIconEnd,
30-
outlinedBig, outlinedBigIconStart, outlinedBigIconEnd,
30+
outlinedSmall, outlinedSmallIconStart, outlinedSmallIconEnd,
3131
text, textIconStart, textIconEnd,
32-
textBig, textBigIconStart, textBigIconEnd,
32+
textSmall, textSmallIconStart, textSmallIconEnd,
3333
).map(action)
3434
}
3535
}

app-demo/src/main/res/layout/activity_material_theme.xml

Lines changed: 40 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151

5252
<mobi.lab.components.button.LabButton
5353
android:id="@+id/filled"
54-
style="@style/Widget.LabComponents.Button.Filled"
54+
style="@style/Widget.Lab.Button.Filled"
5555
android:layout_width="wrap_content"
5656
android:layout_height="wrap_content"
5757
android:layout_marginStart="@dimen/margin_default"
@@ -60,7 +60,7 @@
6060

6161
<mobi.lab.components.button.LabButton
6262
android:id="@+id/filled_icon_start"
63-
style="@style/Widget.LabComponents.Button.Filled"
63+
style="@style/Widget.LabComponents.Button.Filled.Icon"
6464
android:layout_width="wrap_content"
6565
android:layout_height="wrap_content"
6666
android:layout_marginTop="@dimen/margin_default"
@@ -84,8 +84,8 @@
8484
/>
8585

8686
<mobi.lab.components.button.LabButton
87-
android:id="@+id/filled_big"
88-
style="@style/Widget.LabComponents.Button.Filled.Big"
87+
android:id="@+id/filled_small"
88+
style="@style/Widget.LabComponents.Button.Filled.Small"
8989
android:layout_width="wrap_content"
9090
android:layout_height="wrap_content"
9191
android:layout_marginTop="@dimen/margin_default"
@@ -94,25 +94,25 @@
9494
android:text="Filled" />
9595

9696
<mobi.lab.components.button.LabButton
97-
android:id="@+id/filled_big_icon_start"
98-
style="@style/Widget.LabComponents.Button.Filled.Big"
97+
android:id="@+id/filled_small_icon_start"
98+
style="@style/Widget.LabComponents.Button.Filled.Small.Icon"
9999
android:layout_width="wrap_content"
100100
android:layout_height="wrap_content"
101101
android:layout_marginTop="@dimen/margin_default"
102102
android:layout_marginStart="@dimen/margin_default"
103103
android:layout_marginEnd="@dimen/margin_default"
104-
android:text="Filled Big"
104+
android:text="Filled Small"
105105
app:icon="@drawable/ic_placeholder16" />
106106

107107
<mobi.lab.components.button.LabButton
108-
android:id="@+id/filled_big_icon_end"
109-
style="@style/Widget.LabComponents.Button.Filled.Big"
108+
android:id="@+id/filled_small_icon_end"
109+
style="@style/Widget.LabComponents.Button.Filled.Small"
110110
android:layout_width="wrap_content"
111111
android:layout_height="wrap_content"
112112
android:layout_marginTop="@dimen/margin_default"
113113
android:layout_marginStart="@dimen/margin_default"
114114
android:layout_marginEnd="@dimen/margin_default"
115-
android:text="Filled Big"
115+
android:text="Filled Small"
116116
app:iconGravity="end"
117117
app:icon="@drawable/ic_placeholder16" />
118118

@@ -133,7 +133,7 @@
133133

134134
<mobi.lab.components.button.LabButton
135135
android:id="@+id/tonal_icon_start"
136-
style="@style/Widget.LabComponents.Button.Tonal"
136+
style="@style/Widget.LabComponents.Button.Tonal.Icon"
137137
android:layout_width="wrap_content"
138138
android:layout_height="wrap_content"
139139
android:layout_marginTop="@dimen/margin_default"
@@ -157,35 +157,35 @@
157157
/>
158158

159159
<mobi.lab.components.button.LabButton
160-
android:id="@+id/tonal_big"
161-
style="@style/Widget.LabComponents.Button.Tonal.Big"
160+
android:id="@+id/tonal_small"
161+
style="@style/Widget.LabComponents.Button.Tonal.Small"
162162
android:layout_width="wrap_content"
163163
android:layout_height="wrap_content"
164164
android:layout_marginTop="@dimen/margin_default"
165165
android:layout_marginStart="@dimen/margin_default"
166166
android:layout_marginEnd="@dimen/margin_default"
167-
android:text="Tonal Big" />
167+
android:text="Tonal Small" />
168168

169169
<mobi.lab.components.button.LabButton
170-
android:id="@+id/tonal_big_icon_start"
171-
style="@style/Widget.LabComponents.Button.Tonal.Big"
170+
android:id="@+id/tonal_small_icon_start"
171+
style="@style/Widget.LabComponents.Button.Tonal.Small.Icon"
172172
android:layout_width="wrap_content"
173173
android:layout_height="wrap_content"
174174
android:layout_marginTop="@dimen/margin_default"
175175
android:layout_marginStart="@dimen/margin_default"
176176
android:layout_marginEnd="@dimen/margin_default"
177-
android:text="Tonal Big"
177+
android:text="Tonal Small"
178178
app:icon="@drawable/ic_placeholder16" />
179179

180180
<mobi.lab.components.button.LabButton
181-
android:id="@+id/tonal_big_icon_end"
182-
style="@style/Widget.LabComponents.Button.Tonal.Big"
181+
android:id="@+id/tonal_small_icon_end"
182+
style="@style/Widget.LabComponents.Button.Tonal.Small"
183183
android:layout_width="wrap_content"
184184
android:layout_height="wrap_content"
185185
android:layout_marginTop="@dimen/margin_default"
186186
android:layout_marginStart="@dimen/margin_default"
187187
android:layout_marginEnd="@dimen/margin_default"
188-
android:text="Tonal Big"
188+
android:text="Tonal Small"
189189
app:iconGravity="end"
190190
app:icon="@drawable/ic_placeholder16" />
191191

@@ -206,7 +206,7 @@
206206

207207
<mobi.lab.components.button.LabButton
208208
android:id="@+id/outlined_icon_start"
209-
style="@style/Widget.LabComponents.Button.Outlined"
209+
style="@style/Widget.LabComponents.Button.Outlined.Icon"
210210
android:layout_width="wrap_content"
211211
android:layout_height="wrap_content"
212212
android:layout_marginTop="@dimen/margin_default"
@@ -229,35 +229,35 @@
229229
app:icon="@drawable/ic_placeholder16" />
230230

231231
<mobi.lab.components.button.LabButton
232-
android:id="@+id/outlined_big"
233-
style="@style/Widget.LabComponents.Button.Outlined.Big"
232+
android:id="@+id/outlined_small"
233+
style="@style/Widget.LabComponents.Button.Outlined.Small"
234234
android:layout_width="wrap_content"
235235
android:layout_height="wrap_content"
236236
android:layout_marginTop="@dimen/margin_default"
237237
android:layout_marginStart="@dimen/margin_default"
238238
android:layout_marginEnd="@dimen/margin_default"
239-
android:text="Outlined Big" />
239+
android:text="Outlined Small" />
240240

241241
<mobi.lab.components.button.LabButton
242-
android:id="@+id/outlined_big_icon_start"
243-
style="@style/Widget.LabComponents.Button.Outlined.Big"
242+
android:id="@+id/outlined_small_icon_start"
243+
style="@style/Widget.LabComponents.Button.Outlined.Small.Icon"
244244
android:layout_width="wrap_content"
245245
android:layout_height="wrap_content"
246246
android:layout_marginTop="@dimen/margin_default"
247247
android:layout_marginStart="@dimen/margin_default"
248248
android:layout_marginEnd="@dimen/margin_default"
249-
android:text="Outlined Big"
249+
android:text="Outlined Small"
250250
app:icon="@drawable/ic_placeholder16" />
251251

252252
<mobi.lab.components.button.LabButton
253-
android:id="@+id/outlined_big_icon_end"
254-
style="@style/Widget.LabComponents.Button.Outlined.Big"
253+
android:id="@+id/outlined_small_icon_end"
254+
style="@style/Widget.LabComponents.Button.Outlined.Small"
255255
android:layout_width="wrap_content"
256256
android:layout_height="wrap_content"
257257
android:layout_marginTop="@dimen/margin_default"
258258
android:layout_marginStart="@dimen/margin_default"
259259
android:layout_marginEnd="@dimen/margin_default"
260-
android:text="Outlined Big"
260+
android:text="Outlined Small"
261261
app:iconGravity="end"
262262
app:icon="@drawable/ic_placeholder16" />
263263

@@ -278,7 +278,7 @@
278278

279279
<mobi.lab.components.button.LabButton
280280
android:id="@+id/text_icon_start"
281-
style="@style/Widget.LabComponents.Button.Text"
281+
style="@style/Widget.LabComponents.Button.Text.Icon"
282282
android:layout_width="wrap_content"
283283
android:layout_height="wrap_content"
284284
android:layout_marginTop="@dimen/margin_default"
@@ -302,35 +302,35 @@
302302
/>
303303

304304
<mobi.lab.components.button.LabButton
305-
android:id="@+id/text_big"
306-
style="@style/Widget.LabComponents.Button.Text.Big"
305+
android:id="@+id/text_small"
306+
style="@style/Widget.LabComponents.Button.Text.Small"
307307
android:layout_width="wrap_content"
308308
android:layout_height="wrap_content"
309309
android:layout_marginTop="@dimen/margin_default"
310310
android:layout_marginStart="@dimen/margin_default"
311311
android:layout_marginEnd="@dimen/margin_default"
312-
android:text="Text Big" />
312+
android:text="Text Small" />
313313

314314
<mobi.lab.components.button.LabButton
315-
android:id="@+id/text_big_icon_start"
316-
style="@style/Widget.LabComponents.Button.Text.Big"
315+
android:id="@+id/text_small_icon_start"
316+
style="@style/Widget.LabComponents.Button.Text.Small.Icon"
317317
android:layout_width="wrap_content"
318318
android:layout_height="wrap_content"
319319
android:layout_marginTop="@dimen/margin_default"
320320
android:layout_marginStart="@dimen/margin_default"
321321
android:layout_marginEnd="@dimen/margin_default"
322-
android:text="Text Big"
322+
android:text="Text Small"
323323
app:icon="@drawable/ic_placeholder16" />
324324

325325
<mobi.lab.components.button.LabButton
326-
android:id="@+id/text_big_icon_end"
327-
style="@style/Widget.LabComponents.Button.Text.Big"
326+
android:id="@+id/text_small_icon_end"
327+
style="@style/Widget.LabComponents.Button.Text.Small"
328328
android:layout_width="wrap_content"
329329
android:layout_height="wrap_content"
330330
android:layout_marginTop="@dimen/margin_default"
331331
android:layout_marginStart="@dimen/margin_default"
332332
android:layout_marginEnd="@dimen/margin_default"
333-
android:text="Text Big"
333+
android:text="Text Small"
334334
app:iconGravity="end"
335335
app:icon="@drawable/ic_placeholder16" />
336336
</LinearLayout>

0 commit comments

Comments
 (0)