Skip to content

Commit 2f43c69

Browse files
committed
修正属性名 shape_strokeGradientColor 为 shape_strokeGradientEndColor
1 parent 90959ed commit 2f43c69

18 files changed

Lines changed: 39 additions & 33 deletions

Adaptive.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22

33
* 你好,如果你是刚使用这个库的人可以不必理会,如果你之前使用了 `ShapeView` 这个库,也就是 `9.0` 版本以下的,在升级到 `9.0` 版本后需要进行适配,否则 `Android Studio` 会报错`编译不通过`,对于这个问题我表示十分抱歉,低版本的 `xml` 属性命名得并不是很规范,现在在 `9.0` 版本进行优化,尽管这次的代价比较大,但是我会义无反顾去做,如果你使用了 `ShapeView ` 但是不想进行适配,请不要升级依赖库版本。
44

5+
#### 从 9.2 版本升级到 9.3 版本适配方案
6+
7+
* 修改
8+
9+
* 修改 `app:shape_strokeGradientColor` 属性名,请使用 `app:shape_strokeGradientEndColor` 代替
10+
511
#### 从 9.0 版本升级到 9.2 版本适配方案
612

713
* 新增属性

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
* 博客介绍:[震惊,没想到 Shape 也可以这么写](https://www.jianshu.com/p/1288d8873440)
66

7-
* 可以扫码下载 Demo 进行演示或者测试,如果扫码下载不了的,[点击此处可直接下载](https://github.com/getActivity/ShapeView/releases/download/9.0/ShapeView.apk)
7+
* 可以扫码下载 Demo 进行演示或者测试,如果扫码下载不了的,[点击此处可直接下载](https://github.com/getActivity/ShapeView/releases/download/9.2/ShapeView.apk)
88

99
![](picture/demo_code.png)
1010

@@ -214,7 +214,7 @@ shapeButton.setOnClickListener(new View.OnClickListener() {
214214
<!-- 边框渐变色中间颜色(可不设置) -->
215215
<attr name="shape_strokeGradientCenterColor" format="color" />
216216
<!-- 边框渐变色结束颜色 -->
217-
<attr name="shape_strokeGradientColor" format="color" />
217+
<attr name="shape_strokeGradientEndColor" format="color" />
218218

219219
<!-- 边框色渐变方向(仅用于线性渐变) -->
220220
<attr name="shape_strokeGradientOrientation" >

UseDemo.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@
133133
android:textColor="@android:color/black"
134134
android:textSize="14sp"
135135
app:shape_radius="20dp"
136-
app:shape_strokeGradientColor="#f08833"
136+
app:shape_strokeGradientEndColor="#f08833"
137137
app:shape_strokeGradientOrientation="topToBottom"
138138
app:shape_strokePressedColor="@android:color/black"
139139
app:shape_strokeSize="2dp"
@@ -155,7 +155,7 @@
155155
app:shape_solidGradientOrientation="topToBottom"
156156
app:shape_solidPressedColor="#5A8DDF"
157157
app:shape_solidGradientStartColor="#49DAFA"
158-
app:shape_strokeGradientColor="#f08833"
158+
app:shape_strokeGradientEndColor="#f08833"
159159
app:shape_strokeGradientOrientation="topToBottom"
160160
app:shape_strokePressedColor="@android:color/black"
161161
app:shape_strokeSize="2dp"

app/src/main/res/layout/activity_main.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
android:textColor="@android:color/black"
174174
android:textSize="14sp"
175175
app:shape_radius="20dp"
176-
app:shape_strokeGradientColor="#f08833"
176+
app:shape_strokeGradientEndColor="#f08833"
177177
app:shape_strokeGradientOrientation="topToBottom"
178178
app:shape_strokeGradientStartColor="#fefa54"
179179
app:shape_strokePressedColor="@android:color/black"
@@ -195,7 +195,7 @@
195195
app:shape_solidGradientOrientation="topToBottom"
196196
app:shape_solidGradientStartColor="#49DAFA"
197197
app:shape_solidPressedColor="#5A8DDF"
198-
app:shape_strokeGradientColor="#f08833"
198+
app:shape_strokeGradientEndColor="#f08833"
199199
app:shape_strokeGradientOrientation="topToBottom"
200200
app:shape_strokeGradientStartColor="#fefa54"
201201
app:shape_strokePressedColor="@android:color/black"

library/src/main/java/com/hjq/shape/styleable/ShapeButtonStyleable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public int getStrokeGradientCenterColorStyleable() {
178178

179179
@Override
180180
public int getStrokeGradientEndColorStyleable() {
181-
return R.styleable.ShapeButton_shape_strokeGradientColor;
181+
return R.styleable.ShapeButton_shape_strokeGradientEndColor;
182182
}
183183

184184
@Override

library/src/main/java/com/hjq/shape/styleable/ShapeCheckBoxStyleable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public int getStrokeGradientCenterColorStyleable() {
190190

191191
@Override
192192
public int getStrokeGradientEndColorStyleable() {
193-
return R.styleable.ShapeCheckBox_shape_strokeGradientColor;
193+
return R.styleable.ShapeCheckBox_shape_strokeGradientEndColor;
194194
}
195195

196196
@Override

library/src/main/java/com/hjq/shape/styleable/ShapeConstraintLayoutStyleable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public int getStrokeGradientCenterColorStyleable() {
177177

178178
@Override
179179
public int getStrokeGradientEndColorStyleable() {
180-
return R.styleable.ShapeConstraintLayout_shape_strokeGradientColor;
180+
return R.styleable.ShapeConstraintLayout_shape_strokeGradientEndColor;
181181
}
182182

183183
@Override

library/src/main/java/com/hjq/shape/styleable/ShapeEditTextStyleable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ public int getStrokeGradientCenterColorStyleable() {
178178

179179
@Override
180180
public int getStrokeGradientEndColorStyleable() {
181-
return R.styleable.ShapeEditText_shape_strokeGradientColor;
181+
return R.styleable.ShapeEditText_shape_strokeGradientEndColor;
182182
}
183183

184184
@Override

library/src/main/java/com/hjq/shape/styleable/ShapeFrameLayoutStyleable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public int getStrokeGradientCenterColorStyleable() {
177177

178178
@Override
179179
public int getStrokeGradientEndColorStyleable() {
180-
return R.styleable.ShapeFrameLayout_shape_strokeGradientColor;
180+
return R.styleable.ShapeFrameLayout_shape_strokeGradientEndColor;
181181
}
182182

183183
@Override

library/src/main/java/com/hjq/shape/styleable/ShapeImageViewStyleable.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ public int getStrokeGradientCenterColorStyleable() {
177177

178178
@Override
179179
public int getStrokeGradientEndColorStyleable() {
180-
return R.styleable.ShapeImageView_shape_strokeGradientColor;
180+
return R.styleable.ShapeImageView_shape_strokeGradientEndColor;
181181
}
182182

183183
@Override

0 commit comments

Comments
 (0)