Skip to content

Commit b6f1359

Browse files
Set and override textview margins with dimens.xml
1 parent c9de882 commit b6f1359

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

library/src/main/res/layout/stepper_touch.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
android:id="@+id/textViewNegative"
1313
android:layout_width="wrap_content"
1414
android:layout_height="wrap_content"
15-
android:layout_marginLeft="16dp"
16-
android:layout_marginStart="16dp"
15+
android:layout_marginLeft="@dimen/stepper_side_control_margin_start"
16+
android:layout_marginStart="@dimen/stepper_side_control_margin_start"
1717
android:text="@string/stepper_text_negative"
1818
android:textSize="@dimen/stepper_side_control_text_size"
1919
app:layout_constraintBottom_toBottomOf="parent"
@@ -46,8 +46,8 @@
4646
android:id="@+id/textViewPositive"
4747
android:layout_width="wrap_content"
4848
android:layout_height="wrap_content"
49-
android:layout_marginEnd="16dp"
50-
android:layout_marginRight="16dp"
49+
android:layout_marginEnd="@dimen/stepper_side_control_margin_end"
50+
android:layout_marginRight="@dimen/stepper_side_control_margin_end"
5151
android:text="@string/stepper_text_positive"
5252
android:textSize="@dimen/stepper_side_control_text_size"
5353
app:layout_constraintBottom_toBottomOf="parent"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33
<dimen name="stepper_side_control_text_size">20sp</dimen>
4+
<dimen name="stepper_side_control_margin_start">16dp</dimen>
5+
<dimen name="stepper_side_control_margin_end">16dp</dimen>
46
</resources>

0 commit comments

Comments
 (0)