Skip to content

Commit 94c551f

Browse files
committed
change buttons style
1 parent 9223415 commit 94c551f

File tree

19 files changed

+53
-94
lines changed

19 files changed

+53
-94
lines changed

core/src/main/res/layout/buttons_row_item_layout.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,10 @@
55
android:id="@+id/btnButtonsRowView"
66
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
77
android:layout_width="match_parent"
8-
android:layout_height="wrap_content"
8+
android:layout_height="@dimen/button_height"
99
android:ellipsize="end"
1010
android:maxLines="1"
11-
android:textColor="@color/white"
11+
android:textColor="?appLightTextColor"
1212
app:backgroundTint="@color/transparent"
13+
app:cornerRadius="@dimen/button_corner_radius"
1314
tools:text="Button name" />

core/src/main/res/layout/buttons_row_view_layout.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
<com.google.android.material.button.MaterialButton
1010
style="@style/Widget.MaterialComponents.Button.UnelevatedButton"
1111
android:layout_width="match_parent"
12-
android:layout_height="wrap_content"
12+
android:layout_height="@dimen/button_height"
1313
android:layout_marginStart="8dp"
1414
android:layout_marginEnd="8dp"
1515
android:clickable="false"
1616
android:focusable="false"
17-
app:backgroundTint="?appInactiveColor" />
17+
app:backgroundTint="?appInactiveColor"
18+
app:cornerRadius="@dimen/button_corner_radius" />
1819

1920
<androidx.recyclerview.widget.RecyclerView
2021
android:id="@+id/rvButtonsRowView"

core/src/main/res/values/dimens.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,7 @@
1717
<dimen name="color_icon_item_corner_radius">8dp</dimen>
1818
<dimen name="color_icon_item_elevation">4dp</dimen>
1919
<dimen name="color_icon_recycler_margin">8dp</dimen>
20+
21+
<dimen name="button_height">58dp</dimen>
22+
<dimen name="button_corner_radius">8dp</dimen>
2023
</resources>

core/src/main/res/values/styles.xml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -242,12 +242,24 @@
242242
<item name="android:paddingTop">12dp</item>
243243
</style>
244244

245-
<style name="ContainerRangeMainButton">
245+
<style name="AppButton">
246+
<item name="android:layout_height">@dimen/button_height</item>
247+
<item name="android:textColor">?appLightTextColor</item>
248+
<item name="backgroundTint">?appInactiveColor</item>
249+
<item name="cornerRadius">@dimen/button_corner_radius</item>
250+
</style>
251+
252+
<style name="AppButtonActive">
253+
<item name="android:layout_height">@dimen/button_height</item>
254+
<item name="android:textColor">?appLightTextColor</item>
255+
<item name="backgroundTint">?appActiveColor</item>
256+
<item name="cornerRadius">@dimen/button_corner_radius</item>
257+
</style>
258+
259+
<style name="ContainerRangeMainButton" parent="AppButtonActive">
246260
<item name="android:layout_marginStart">8dp</item>
247261
<item name="android:layout_marginEnd">8dp</item>
248262
<item name="android:padding">0dp</item>
249-
<item name="android:textColor">@color/white</item>
250-
<item name="backgroundTint">?appActiveColor</item>
251263
<item name="layout_constraintHorizontal_weight">2.5</item>
252264
</style>
253265

@@ -258,9 +270,8 @@
258270
<item name="iconTint">@color/white</item>
259271
</style>
260272

261-
<style name="ContainerRangeButton">
273+
<style name="ContainerRangeButton" parent="AppButton">
262274
<item name="android:scaleType">fitXY</item>
263-
<item name="backgroundTint">?appInactiveColor</item>
264275
<item name="icon">@drawable/arrow_left</item>
265276
<item name="iconGravity">start</item>
266277
<item name="iconTint">@color/white</item>

feature_change_category/src/main/res/layout/change_category_fragment.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,15 +171,12 @@
171171

172172
<com.google.android.material.button.MaterialButton
173173
android:id="@+id/btnChangeCategorySave"
174+
style="@style/AppButtonActive"
174175
android:layout_width="match_parent"
175-
android:layout_height="wrap_content"
176176
android:layout_marginStart="8dp"
177177
android:layout_marginTop="8dp"
178178
android:layout_marginEnd="8dp"
179-
android:gravity="center"
180179
android:text="@string/change_category_save"
181-
android:textColor="?appLightTextColor"
182-
app:backgroundTint="?appActiveColor"
183180
app:layout_constraintBottom_toBottomOf="parent" />
184181

185182
</androidx.constraintlayout.widget.ConstraintLayout>

feature_change_record/src/main/res/layout/change_record_fragment.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -232,15 +232,12 @@
232232

233233
<com.google.android.material.button.MaterialButton
234234
android:id="@+id/btnChangeRecordSave"
235+
style="@style/AppButtonActive"
235236
android:layout_width="match_parent"
236-
android:layout_height="wrap_content"
237237
android:layout_marginStart="8dp"
238238
android:layout_marginTop="8dp"
239239
android:layout_marginEnd="8dp"
240-
android:gravity="center"
241240
android:text="@string/change_record_save"
242-
android:textColor="?appLightTextColor"
243-
app:backgroundTint="?appActiveColor"
244241
app:layout_constraintBottom_toBottomOf="parent" />
245242

246243
</androidx.constraintlayout.widget.ConstraintLayout>

feature_change_record_tag/src/main/res/layout/change_record_tag_fragment.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,15 +112,12 @@
112112

113113
<com.google.android.material.button.MaterialButton
114114
android:id="@+id/btnChangeRecordTagSave"
115+
style="@style/AppButtonActive"
115116
android:layout_width="match_parent"
116-
android:layout_height="wrap_content"
117117
android:layout_marginStart="8dp"
118118
android:layout_marginTop="8dp"
119119
android:layout_marginEnd="8dp"
120-
android:gravity="center"
121120
android:text="@string/change_category_save"
122-
android:textColor="?appLightTextColor"
123-
app:backgroundTint="?appActiveColor"
124121
app:layout_constraintBottom_toBottomOf="parent" />
125122

126123
</androidx.constraintlayout.widget.ConstraintLayout>

feature_change_record_type/src/main/res/layout/change_record_type_fragment.xml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,15 +316,11 @@
316316

317317
<com.google.android.material.button.MaterialButton
318318
android:id="@+id/btnChangeRecordTypeSave"
319+
style="@style/AppButtonActive"
319320
android:layout_width="match_parent"
320-
android:layout_height="wrap_content"
321-
android:layout_marginStart="8dp"
321+
android:layout_marginHorizontal="8dp"
322322
android:layout_marginTop="8dp"
323-
android:layout_marginEnd="8dp"
324-
android:gravity="center"
325323
android:text="@string/change_record_type_save"
326-
android:textColor="?appLightTextColor"
327-
app:backgroundTint="?appActiveColor"
328324
app:layout_constraintBottom_toBottomOf="parent" />
329325

330326
</androidx.constraintlayout.widget.ConstraintLayout>

feature_change_running_record/src/main/res/layout/change_running_record_fragment.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -202,15 +202,12 @@
202202

203203
<com.google.android.material.button.MaterialButton
204204
android:id="@+id/btnChangeRunningRecordSave"
205+
style="@style/AppButtonActive"
205206
android:layout_width="match_parent"
206-
android:layout_height="wrap_content"
207207
android:layout_marginStart="8dp"
208208
android:layout_marginTop="8dp"
209209
android:layout_marginEnd="8dp"
210-
android:gravity="center"
211210
android:text="@string/change_record_save"
212-
android:textColor="?appLightTextColor"
213-
app:backgroundTint="?appActiveColor"
214211
app:layout_constraintBottom_toBottomOf="parent" />
215212

216213
</androidx.constraintlayout.widget.ConstraintLayout>

feature_dialogs/src/main/res/layout/archive_dialog_fragment.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
android:id="@+id/rvArchiveDialogContent"
2020
android:layout_width="match_parent"
2121
android:layout_height="wrap_content"
22-
android:layout_marginVertical="16dp"
22+
android:layout_marginTop="16dp"
2323
tools:itemCount="1"
2424
tools:listitem="@layout/item_record_type_layout" />
2525

0 commit comments

Comments
 (0)