Skip to content
This repository was archived by the owner on Aug 22, 2020. It is now read-only.

Commit 2f2d6ba

Browse files
committed
Remove AppCompat library dependency
Signed-off-by: Fung <fython@163.com>
1 parent 1a661d2 commit 2f2d6ba

File tree

4 files changed

+30
-12
lines changed

4 files changed

+30
-12
lines changed

library/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ dependencies {
2525
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
2626
exclude group: 'com.android.support', module: 'support-annotations'
2727
})
28-
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
2928
compile "com.android.support:recyclerview-v7:$supportLibraryVersion"
3029
testCompile 'junit:junit:4.12'
3130
}

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

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
android:layout_width="wrap_content"
3838
android:layout_height="wrap_content"
3939
android:layout_gravity="center"
40-
android:text="1"
40+
tools:text="1"
4141
android:textSize="12sp"
4242
android:maxLines="1"
4343
android:maxLength="2"
@@ -49,7 +49,8 @@
4949
android:layout_height="wrap_content"
5050
android:layout_gravity="center"
5151
android:alpha="0"
52-
android:src="@drawable/ic_done_white_16dp"/>
52+
android:src="@drawable/ic_done_white_16dp"
53+
android:importantForAccessibility="no"/>
5354

5455
</moe.feng.common.stepperview.internal.ClipOvalFrameLayout>
5556

@@ -59,7 +60,8 @@
5960
android:layout_height="@dimen/stepper_point_size"
6061
android:src="@drawable/ic_warning_black_24dp"
6162
android:tint="@color/material_red_500"
62-
android:alpha="0"/>
63+
android:alpha="0"
64+
android:importantForAccessibility="no"/>
6365

6466
</FrameLayout>
6567

@@ -87,16 +89,16 @@
8789
android:id="@+id/stepper_title"
8890
android:layout_width="wrap_content"
8991
android:layout_height="wrap_content"
90-
android:textAppearance="@android:style/TextAppearance.Material.Body2"
92+
android:textAppearance="@style/TextAppearance.MaterialCompat.Body2"
9193
android:maxLines="2"
92-
android:text="Title"/>
94+
tools:text="Title"/>
9395

9496
<TextView
9597
android:id="@+id/stepper_summary"
9698
android:layout_width="wrap_content"
9799
android:layout_height="wrap_content"
98-
android:textAppearance="@android:style/TextAppearance.Material.Body1"
99-
android:text="Summary"/>
100+
android:textAppearance="@style/TextAppearance.MaterialCompat.Body1"
101+
tools:text="Summary"/>
100102

101103
<FrameLayout
102104
android:id="@+id/stepper_custom_view"

library/src/main/res/values/colors.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
<color name="material_grey_500">#9E9E9E</color>
55
<color name="material_grey_400">#BDBDBD</color>
66
<color name="material_red_500">#F44336</color>
7+
<color name="material_blue_500">#2196F3</color>
78

89
</resources>
Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,41 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<resources>
33

4-
<style name="TextAppearance.Widget.Stepper.Done" parent="TextAppearance.AppCompat.Body1">
4+
<style name="TextAppearance.Widget.Stepper.Done" parent="TextAppearance.MaterialCompat.Body1">
55

66
</style>
77

8-
<style name="TextAppearance.Widget.Stepper.Selected" parent="TextAppearance.AppCompat.Body2">
8+
<style name="TextAppearance.Widget.Stepper.Selected" parent="TextAppearance.MaterialCompat.Body2">
99

1010
</style>
1111

12-
<style name="TextAppearance.Widget.Stepper.Normal" parent="TextAppearance.AppCompat.Body1">
12+
<style name="TextAppearance.Widget.Stepper.Normal" parent="TextAppearance.MaterialCompat.Body1">
1313
<item name="android:textColor">?android:textColorSecondary</item>
1414
</style>
1515

1616
<style name="Widget.Stepper" parent="">
1717
<item name="step_normal_color">@color/material_grey_500</item>
18-
<item name="step_activated_color">?attr/colorPrimary</item>
18+
<item name="step_activated_color">@color/material_blue_500</item>
1919
<item name="step_done_icon">@drawable/ic_done_white_16dp</item>
2020
<item name="step_animation_duration">@android:integer/config_shortAnimTime</item>
2121
<item name="step_line_color">@color/material_grey_500</item>
2222
<item name="step_error_highlight_color">@color/material_red_500</item>
2323
</style>
2424

25+
<style name="TextAppearance"/>
26+
27+
<style name="TextAppearance.MaterialCompat"/>
28+
29+
<style name="TextAppearance.MaterialCompat.Body1">
30+
<item name="android:textSize">14sp</item>
31+
<item name="android:fontFamily">sans-serif</item>
32+
<item name="android:textColor">?android:attr/textColorPrimary</item>
33+
</style>
34+
35+
<style name="TextAppearance.MaterialCompat.Body2">
36+
<item name="android:textSize">14sp</item>
37+
<item name="android:fontFamily">sans-serif-medium</item>
38+
<item name="android:textColor">?android:attr/textColorPrimary</item>
39+
</style>
40+
2541
</resources>

0 commit comments

Comments
 (0)