Skip to content

Commit

Permalink
v1.2.3
Browse files Browse the repository at this point in the history
1.fix:SelectorAttrs在低版本上没有设置背景色时显示黑色
  • Loading branch information
huangziwei committed Aug 7, 2018
1 parent 1ac28f8 commit 7db2304
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
1 change: 0 additions & 1 deletion AndroidsDemo/res/layout/activity_maskimageview.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
<cn.forward.androids.views.MaskImageView
android:layout_width="110dp"
android:layout_height="110dp"
android:background="@drawable/bg"
android:clickable="true"
android:scaleType="fitXY"
android:src="@drawable/ic_launcher"
Expand Down
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ allprojects {
}
dependencies {
compile 'com.github.1993hzw:Androids:1.2.2'
compile 'com.github.1993hzw:Androids:1.2.3'
}
```
### 项目结构
Expand Down Expand Up @@ -259,6 +259,10 @@ dependencies {
* [Util](https://github.com/1993hzw/Androids/blob/master/androids/src/cn/forward/androids/utils/Util.java)

### 更新
* v1.2.3(17)

1.fix:SelectorAttrs在低版本上没有设置背景色时显示黑色

* v1.2.2(16)

1.优化手势识别类TouchGestureDetector,ScaleGestureDetector使用Api27源码
Expand Down
4 changes: 2 additions & 2 deletions androids/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 16
versionName "1.2.2"
versionCode 17
versionName "1.2.3"
}
buildTypes {
release {
Expand Down
3 changes: 2 additions & 1 deletion androids/src/cn/forward/androids/views/SelectorAttrs.java
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,9 @@ public static void obtainsAttrs(Context context, View view, AttributeSet attrs)
colorShapeDrawable = new GradientDrawable();
if (bg instanceof ColorDrawable) {
background = ((ColorDrawable) bg).getColor();
colorShapeDrawable.setColor(background);
}
// 兼容低版本,需要设置颜色(没有设置背景颜色属性时必须设为透明)
colorShapeDrawable.setColor(background);
}
if (colorShapeDrawablePressed != null) {
colorShapeDrawablePressed.setColor(background);
Expand Down

0 comments on commit 7db2304

Please sign in to comment.