Skip to content

Commit d37b0f8

Browse files
committed
update readme
1 parent d406cba commit d37b0f8

3 files changed

Lines changed: 18 additions & 6 deletions

File tree

READEME_CN.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
## 显示效果
99
![1](https://github.com/yingLanNull/ShadowImageView/blob/master/show/shadow1.png)
1010
![2](https://github.com/yingLanNull/ShadowImageView/blob/master/show/shadow2.png)
11+
![3](https://github.com/yingLanNull/ShadowImageView/blob/master/show/shadowcolor.png)
1112

1213
## 动图
1314
![1](https://github.com/yingLanNull/ShadowImageView/blob/master/show/shadow.gif)
@@ -20,7 +21,7 @@
2021
#### Gradle 配置
2122
```
2223
dependencies {
23-
compile 'com.yinglan.shadowimageview:shadowimageview:1.0.3'
24+
compile 'com.yinglan.shadowimageview:shadowimageview:1.0.4'
2425
}
2526
```
2627

@@ -32,7 +33,8 @@ dependencies {
3233
android:layout_width="300dp"
3334
android:layout_height="300dp"
3435
app:shadowRound="20dp"
35-
app:shadowSrc="@mipmap/lotus" />
36+
app:shadowSrc="@mipmap/lotus"
37+
app:shadowColor="@color/colorAccent"/>
3638
3739
```
3840

@@ -47,7 +49,10 @@ dependencies {
4749
```
4850
shadow.setImageRadius(radius);
4951
```
50-
52+
### 设置图片阴影颜色
53+
```
54+
shadow.setImageShadowColor(color);
55+
```
5156
## 注意
5257

5358
阴影效果的简单实现,可能会有潜在的问题做学习交流使用,期待大家有更好的实现方式。目前暂不支持直接使用加载网络图片,如需要展示网络图片可变通使用网络图片加载库,demo中有使用方法。

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
## Picture
99
![1](https://github.com/yingLanNull/ShadowImageView/blob/master/show/shadow1.png)
1010
![2](https://github.com/yingLanNull/ShadowImageView/blob/master/show/shadow2.png)
11+
![3](https://github.com/yingLanNull/ShadowImageView/blob/master/show/shadowcolor.png)
1112

1213
## GIF
1314
![1](https://github.com/yingLanNull/ShadowImageView/blob/master/show/shadow.gif)
@@ -20,7 +21,7 @@
2021
#### Gradle
2122
```
2223
dependencies {
23-
compile 'com.yinglan.shadowimageview:shadowimageview:1.0.3'
24+
compile 'com.yinglan.shadowimageview:shadowimageview:1.0.4'
2425
}
2526
```
2627

@@ -32,7 +33,8 @@ dependencies {
3233
android:layout_width="300dp"
3334
android:layout_height="300dp"
3435
app:shadowRound="20dp"
35-
app:shadowSrc="@mipmap/lotus" />
36+
app:shadowSrc="@mipmap/lotus"
37+
app:shadowColor="@color/colorAccent"/>
3638
3739
```
3840

@@ -47,6 +49,10 @@ dependencies {
4749
```
4850
shadow.setImageRadius(radius);
4951
```
52+
### Set the shadow color of the image
53+
```
54+
shadow.setImageShadowColor(color);
55+
```
5056

5157
## FAQ
5258
See[PPMusicImageShadow](https://github.com/PierrePerrin/PPMusicImageShadow), do a simple implementation, there may be a potential problem and use learning exchanges, looking forward to you have a better way of implementation.

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
android:layout_width="300dp"
2626
android:layout_height="150dp"
2727
app:shadowRound="5dp"
28-
app:shadowSrc="@mipmap/lotus" />
28+
app:shadowSrc="@mipmap/lotus"
29+
app:shadowColor="@color/colorPrimary"/>
2930

3031
</LinearLayout>

0 commit comments

Comments
 (0)