Skip to content

Commit ffc5c8c

Browse files
committed
1,修改bug
1 parent e76a2a5 commit ffc5c8c

File tree

3 files changed

+128
-114
lines changed

3 files changed

+128
-114
lines changed

README-zh.md

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ ShapeImageView|AlmightyShapeImageView
3838

3939
```gradle
4040
dependencies {
41-
implementation 'com.github.FlyJingFish:ShapeImageView:1.4.2'
41+
implementation 'com.github.FlyJingFish:ShapeImageView:1.4.3'
4242
}
4343
```
4444
## 第三步,使用说明
@@ -81,38 +81,38 @@ ShapeImageView|AlmightyShapeImageView
8181

8282
### 属性一览
8383

84-
|attr|format|description|
85-
|---|:---:|:---:|
86-
|shape|enum|图片是 rectangle矩形/oval圆形|
87-
|shape_radius|dimension|图片四个角圆角|
88-
|shape_left_top_radius|dimension|图片左上角圆角|
89-
|shape_right_top_radius|dimension|图片右上角圆角|
90-
|shape_right_bottom_radius|dimension|图片右下角圆角|
91-
|shape_left_bottom_radius|dimension|图片左下角圆角|
92-
|shape_start_top_radius|dimension|图片左上(Rtl:右上)角圆角|
93-
|shape_end_top_radius|dimension|图片右上(Rtl:左上)角圆角|
94-
|shape_end_bottom_radius|dimension|图片右下(Rtl:左下)角圆角|
95-
|shape_start_bottom_radius|dimension|图片左下(Rtl:右下)角圆角|
96-
|shape_border|enum|背景边框绘制形状是 none不绘制/rectangle矩形/oval圆形|
97-
|shape_border_radius|dimension|背景边框四个角圆角|
98-
|shape_border_left_top_radius|dimension|背景边框左上角圆角|
99-
|shape_border_right_top_radius|dimension|背景边框右上角圆角|
100-
|shape_border_right_bottom_radius|dimension|背景边框右下角圆角|
101-
|shape_border_left_bottom_radius|dimension|背景边框左下角圆角|
102-
|shape_border_start_top_radius|dimension|背景边框左上(Rtl:右上)角圆角|
103-
|shape_border_end_top_radius|dimension|背景边框右上(Rtl:左上)角圆角|
104-
|shape_border_end_bottom_radius|dimension|背景边框右下(Rtl:左下)角圆角|
105-
|shape_border_start_bottom_radius|dimension|背景边框左下(Rtl:右下)角圆角|
106-
|shape_border_color|color|背景边框绘制颜色|
107-
|shape_border_gradient|boolean|背景边框绘制是否渐变色|
108-
|shape_border_startColor|color|背景边框绘制渐变色开始颜色|
109-
|shape_border_centerColor|color|背景边框绘制渐变色中间颜色|
110-
|shape_border_endColor|color|背景边框绘制渐变色结束颜色|
111-
|shape_border_angle|float|背景边框绘制渐变色开始角度|
112-
|shape_border_rtl_angle|boolean|背景边框绘制渐变色开始角度是否支持镜像Rtl适配|
113-
|shape_border_strokeWidth|dimension|背景边框绘制画笔宽度|
114-
|autoCrop_height_width_ratio|float|图像高宽比是View高宽比的倍数|
115-
|shapeScaleType|enum|如果设置新增显示模式设置这个,详情如下:|
84+
| attr | format | description |
85+
|----------------------------------|:---------:|:------------------------------------:|
86+
| shape | enum | 图片是 rectangle矩形/oval圆形 |
87+
| shape_radius | dimension | 图片四个角圆角 |
88+
| shape_left_top_radius | dimension | 图片左上角圆角 |
89+
| shape_right_top_radius | dimension | 图片右上角圆角 |
90+
| shape_right_bottom_radius | dimension | 图片右下角圆角 |
91+
| shape_left_bottom_radius | dimension | 图片左下角圆角 |
92+
| shape_start_top_radius | dimension | 图片左上(Rtl:右上)角圆角 |
93+
| shape_end_top_radius | dimension | 图片右上(Rtl:左上)角圆角 |
94+
| shape_end_bottom_radius | dimension | 图片右下(Rtl:左下)角圆角 |
95+
| shape_start_bottom_radius | dimension | 图片左下(Rtl:右下)角圆角 |
96+
| shape_border | enum | 背景边框绘制形状是 none不绘制/rectangle矩形/oval圆形 |
97+
| shape_border_radius | dimension | 背景边框四个角圆角 |
98+
| shape_border_left_top_radius | dimension | 背景边框左上角圆角 |
99+
| shape_border_right_top_radius | dimension | 背景边框右上角圆角 |
100+
| shape_border_right_bottom_radius | dimension | 背景边框右下角圆角 |
101+
| shape_border_left_bottom_radius | dimension | 背景边框左下角圆角 |
102+
| shape_border_start_top_radius | dimension | 背景边框左上(Rtl:右上)角圆角 |
103+
| shape_border_end_top_radius | dimension | 背景边框右上(Rtl:左上)角圆角 |
104+
| shape_border_end_bottom_radius | dimension | 背景边框右下(Rtl:左下)角圆角 |
105+
| shape_border_start_bottom_radius | dimension | 背景边框左下(Rtl:右下)角圆角 |
106+
| shape_border_color | color | 背景边框绘制颜色 |
107+
| shape_border_gradient | boolean | 背景边框绘制是否渐变色 |
108+
| shape_border_startColor | color | 背景边框绘制渐变色开始颜色 |
109+
| shape_border_centerColor | color | 背景边框绘制渐变色中间颜色 |
110+
| shape_border_endColor | color | 背景边框绘制渐变色结束颜色 |
111+
| shape_border_angle | float | 背景边框绘制渐变色开始角度 |
112+
| shape_border_rtl_angle | boolean | 背景边框绘制渐变色开始角度是否支持镜像Rtl适配 |
113+
| shape_border_strokeWidth | dimension | 背景边框绘制画笔宽度 |
114+
| autoCrop_height_width_ratio | float | 图像高宽比是View高宽比的倍数 |
115+
| shapeScaleType | enum | 如果设置新增显示模式设置这个,详情如下: |
116116

117117
|shapeScaleType|description|
118118
|---|:---:|
@@ -140,25 +140,25 @@ ShapeImageView|AlmightyShapeImageView
140140

141141
### 属性一览
142142

143-
|attr|format| description |
144-
|---|:---:|:-----------:|
145-
|almighty_shape_resource|reference| 图形资源 |
146-
|almighty_shape_scaleType|enum| 绘制图形资源的显示类型 |
143+
| attr |format| description |
144+
|--------------------------|:---:|:-----------:|
145+
| almighty_shape_resource |reference| 图形资源 |
146+
| almighty_shape_scaleType |enum| 绘制图形资源的显示类型 |
147147

148148

149-
|almighty_shape_scaleType| description |
150-
|---|:-----------------------------------------------------------------------:|
151-
|followImageViewKeepResourceScale| 图形资源跟随ImageView的ScaleType类型并且保持图形资源的宽高比 |
152-
|followImageViewFullImage| 图形资源跟随ImageView的ScaleType类型但是充满图片的宽高(图形相对可能会拉伸) |
153-
|alwaysFixXY| 图形资源不会跟随ImageView的ScaleType,总是充满ImageView容器(设置这个属性有些ScaleType会导致图形显示不全) |
149+
| almighty_shape_scaleType | description |
150+
|----------------------------------|:-----------------------------------------------------------------------:|
151+
| followImageViewKeepResourceScale | 图形资源跟随ImageView的ScaleType类型并且保持图形资源的宽高比 |
152+
| followImageViewFullImage | 图形资源跟随ImageView的ScaleType类型但是充满图片的宽高(图形相对可能会拉伸) |
153+
| alwaysFixXY | 图形资源不会跟随ImageView的ScaleType,总是充满ImageView容器(设置这个属性有些ScaleType会导致图形显示不全) |
154154

155155
### 方法
156156

157-
| method | type |description|
158-
|------------------|:-----------:|:---:|
159-
| setShapeResource | Drawable |图形资源Drawable|
160-
| setShapeResource | DrawableRes |图形资源id|
161-
| setShapeScaleType | ShapeScaleType |设置绘制图形资源的显示类型|
157+
| method | type | description |
158+
|-------------------|:--------------:|:-------------:|
159+
| setShapeResource | Drawable | 图形资源Drawable |
160+
| setShapeResource | DrawableRes | 图形资源id |
161+
| setShapeScaleType | ShapeScaleType | 设置绘制图形资源的显示类型 |
162162

163163
### 图形资源设置提示
164164

README.md

Lines changed: 54 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ ShapeImageView|AlmightyShapeImageView
4242

4343
```gradle
4444
dependencies {
45-
implementation 'com.github.FlyJingFish:ShapeImageView:1.4.2'
45+
implementation 'com.github.FlyJingFish:ShapeImageView:1.4.3'
4646
}
4747
```
4848
## The third step, instructions for use
@@ -85,45 +85,45 @@ ShapeImageView|AlmightyShapeImageView
8585

8686
### List of properties
8787

88-
|attr|format|description|
89-
|---|:---:|:---:|
90-
|shape|enum|The picture is a rectangle/oval circle|
91-
|shape_radius|dimension|The four corners of the image are rounded|
92-
|shape_left_top_radius|dimension|The upper left corner of the image is rounded|
93-
|shape_right_top_radius|dimension|Round corners in the upper right corner of the image|
94-
|shape_right_bottom_radius|dimension|The bottom right corner of the image is rounded|
95-
|shape_left_bottom_radius|dimension|The bottom left corner of the image is rounded|
96-
|shape_start_top_radius|dimension|image top left (Rtl: top right) corner rounded|
97-
|shape_end_top_radius|dimension|image top right (Rtl: top left) corner rounded|
98-
|shape_end_bottom_radius|dimension|picture bottom right (Rtl: bottom left) corner rounded|
99-
|shape_start_bottom_radius|dimension|picture bottom left (Rtl: bottom right) corner rounded|
100-
|shape_border|enum|The background border drawing shape is none without drawing/rectangle rectangle/oval circle|
101-
|shape_border_radius|dimension|The four corners of the background border are rounded|
102-
|shape_border_left_top_radius|dimension|The top left corner of the background border is rounded|
103-
|shape_border_right_top_radius|dimension|rounded corners in the upper right corner of the background border|
104-
|shape_border_right_bottom_radius|dimension|The bottom right corner of the background border is rounded|
105-
|shape_border_left_bottom_radius|dimension|The bottom left corner of the background border is rounded|
106-
|shape_border_start_top_radius|dimension|background border top left (Rtl: top right) corner rounded|
107-
|shape_border_end_top_radius|dimension|background border top right (Rtl: top left) corner rounded|
108-
|shape_border_end_bottom_radius|dimension|background border bottom right (Rtl: bottom left) corner rounded|
109-
|shape_border_start_bottom_radius|dimension|The bottom left (Rtl: bottom right) corner of the background border is rounded|
110-
|shape_border_color|color|Background border drawing color|
111-
|shape_border_gradient|boolean|Whether the background border is drawn in gradient color|
112-
|shape_border_startColor|color|The background border draw gradient color start color|
113-
|shape_border_centerColor|color|The background border draws the gradient middle color|
114-
|shape_border_endColor|color|The background border draws the gradient color end color|
115-
|shape_border_angle|float|Start angle of background border drawing gradient color|
116-
|shape_border_rtl_angle|boolean|Does the gradient start angle of the background border support mirror Rtl adaptation|
117-
|shape_border_strokeWidth|dimension|width of background border drawing brush|
118-
|autoCrop_height_width_ratio|float|The image aspect ratio is a multiple of the View aspect ratio|
119-
|shapeScaleType|enum|If you set the new display mode to set this, the details are as follows:|
120-
121-
|shapeScaleType|description|
122-
|---|:---:|
123-
|startCrop|Crop start top left|
124-
|endCrop|Crop start bottom right|
125-
|autoStartCenterCrop|Automatically switch between startCrop and centerCrop|
126-
|autoEndCenterCrop|Automatically switch between endCrop and centerCrop|
88+
| attr | format | description |
89+
|----------------------------------|:---------:|:-------------------------------------------------------------------------------------------:|
90+
| shape | enum | The picture is a rectangle/oval circle |
91+
| shape_radius | dimension | The four corners of the image are rounded |
92+
| shape_left_top_radius | dimension | The upper left corner of the image is rounded |
93+
| shape_right_top_radius | dimension | Round corners in the upper right corner of the image |
94+
| shape_right_bottom_radius | dimension | The bottom right corner of the image is rounded |
95+
| shape_left_bottom_radius | dimension | The bottom left corner of the image is rounded |
96+
| shape_start_top_radius | dimension | image top left (Rtl: top right) corner rounded |
97+
| shape_end_top_radius | dimension | image top right (Rtl: top left) corner rounded |
98+
| shape_end_bottom_radius | dimension | picture bottom right (Rtl: bottom left) corner rounded |
99+
| shape_start_bottom_radius | dimension | picture bottom left (Rtl: bottom right) corner rounded |
100+
| shape_border | enum | The background border drawing shape is none without drawing/rectangle rectangle/oval circle |
101+
| shape_border_radius | dimension | The four corners of the background border are rounded |
102+
| shape_border_left_top_radius | dimension | The top left corner of the background border is rounded |
103+
| shape_border_right_top_radius | dimension | rounded corners in the upper right corner of the background border |
104+
| shape_border_right_bottom_radius | dimension | The bottom right corner of the background border is rounded |
105+
| shape_border_left_bottom_radius | dimension | The bottom left corner of the background border is rounded |
106+
| shape_border_start_top_radius | dimension | background border top left (Rtl: top right) corner rounded |
107+
| shape_border_end_top_radius | dimension | background border top right (Rtl: top left) corner rounded |
108+
| shape_border_end_bottom_radius | dimension | background border bottom right (Rtl: bottom left) corner rounded |
109+
| shape_border_start_bottom_radius | dimension | The bottom left (Rtl: bottom right) corner of the background border is rounded |
110+
| shape_border_color | color | Background border drawing color |
111+
| shape_border_gradient | boolean | Whether the background border is drawn in gradient color |
112+
| shape_border_startColor | color | The background border draw gradient color start color |
113+
| shape_border_centerColor | color | The background border draws the gradient middle color |
114+
| shape_border_endColor | color | The background border draws the gradient color end color |
115+
| shape_border_angle | float | Start angle of background border drawing gradient color |
116+
| shape_border_rtl_angle | boolean | Does the gradient start angle of the background border support mirror Rtl adaptation |
117+
| shape_border_strokeWidth | dimension | width of background border drawing brush |
118+
| autoCrop_height_width_ratio | float | The image aspect ratio is a multiple of the View aspect ratio |
119+
| shapeScaleType | enum | If you set the new display mode to set this, the details are as follows: |
120+
121+
| shapeScaleType | description |
122+
|---------------------|:-----------------------------------------------------:|
123+
| startCrop | Crop start top left |
124+
| endCrop | Crop start bottom right |
125+
| autoStartCenterCrop | Automatically switch between startCrop and centerCrop |
126+
| autoEndCenterCrop | Automatically switch between endCrop and centerCrop |
127127

128128
# 二、AlmightyShapeImageView Instructions for Use
129129

@@ -144,25 +144,25 @@ ShapeImageView|AlmightyShapeImageView
144144

145145
### List of properties
146146

147-
|attr|format| description |
148-
|---|:---:|:------------:|
149-
|almighty_shape_resource|reference| Shape Resource |
150-
|almighty_shape_scaleType|enum| The display type of the drawing resource |
147+
| attr | format | description |
148+
|--------------------------|:---------:|:----------------------------------------:|
149+
| almighty_shape_resource | reference | Shape Resource |
150+
| almighty_shape_scaleType | enum | The display type of the drawing resource |
151151

152152

153-
|almighty_shape_scaleType| description |
154-
|---|:-----------------------------------------------------------------------:|
155-
|followImageViewKeepResourceScale| The graphics resource follows the ImageView's ScaleType type and maintains the aspect ratio of the graphics resource |
156-
|followImageViewFullImage| The graphics resource follows the ImageView's ScaleType but fills the width and height of the image (the graphics may be stretched relatively) |
157-
|alwaysFixXY| The graphics resource will not follow the ScaleType of the ImageView, and always fill the ImageView container (setting this property to some ScaleType will cause the graphics to be incomplete) |
153+
| almighty_shape_scaleType | description |
154+
|----------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|
155+
| followImageViewKeepResourceScale | The graphics resource follows the ImageView's ScaleType type and maintains the aspect ratio of the graphics resource |
156+
| followImageViewFullImage | The graphics resource follows the ImageView's ScaleType but fills the width and height of the image (the graphics may be stretched relatively) |
157+
| alwaysFixXY | The graphics resource will not follow the ScaleType of the ImageView, and always fill the ImageView container (setting this property to some ScaleType will cause the graphics to be incomplete) |
158158

159159
### Method
160160

161-
| method | type |description|
162-
|-----------------|:-------------:|:---:|
163-
| setShapeResource | Drawable |Shape Resource Drawable|
164-
| setShapeResource | DrawableRes |Shape resource id|
165-
| setShapeResource | ShapeScaleType |Sets the display type for drawing graphics resources|
161+
| method | type | description |
162+
|------------------|:--------------:|:----------------------------------------------------:|
163+
| setShapeResource | Drawable | Shape Resource Drawable |
164+
| setShapeResource | DrawableRes | Shape resource id |
165+
| setShapeResource | ShapeScaleType | Sets the display type for drawing graphics resources |
166166

167167
### Graphic resource setting prompt
168168

0 commit comments

Comments
 (0)