|
18 | 18 | <LinearLayout
|
19 | 19 | android:layout_width="match_parent"
|
20 | 20 | android:layout_height="match_parent"
|
| 21 | + android:clipChildren="false" |
21 | 22 | android:orientation="vertical">
|
22 | 23 |
|
23 | 24 | <!--方式一:ViewOutlineProvider可以设置圆角矩形、椭圆、圆形等-->
|
|
78 | 79 | android:scaleType="centerCrop" />
|
79 | 80 | </LinearLayout>
|
80 | 81 |
|
| 82 | + <!--3、ClipPath--> |
81 | 83 | <TextView
|
82 | 84 | android:layout_width="match_parent"
|
83 | 85 | android:layout_height="wrap_content"
|
|
106 | 108 | android:scaleType="centerCrop" />
|
107 | 109 | </LinearLayout>
|
108 | 110 |
|
| 111 | + <!--4、CardView--> |
109 | 112 | <TextView
|
110 | 113 | android:layout_width="match_parent"
|
111 | 114 | android:layout_height="wrap_content"
|
|
128 | 131 | android:src="@drawable/icon_cat_w" />
|
129 | 132 | </androidx.cardview.widget.CardView>
|
130 | 133 |
|
| 134 | + <!--5、BitmapShader--> |
131 | 135 | <TextView
|
132 | 136 | android:layout_width="match_parent"
|
133 | 137 | android:layout_height="wrap_content"
|
|
141 | 145 | android:layout_height="100dp"
|
142 | 146 | android:layout_gravity="center" />
|
143 | 147 |
|
| 148 | + <!--6、BitmapDrawable--> |
144 | 149 | <TextView
|
145 | 150 | android:layout_width="match_parent"
|
146 | 151 | android:layout_height="wrap_content"
|
|
153 | 158 | android:layout_width="100dp"
|
154 | 159 | android:layout_height="100dp"
|
155 | 160 | android:layout_gravity="center" />
|
| 161 | + <!--7、ImageFilterView--> |
| 162 | + <TextView |
| 163 | + android:layout_width="match_parent" |
| 164 | + android:layout_height="wrap_content" |
| 165 | + android:layout_marginTop="20dp" |
| 166 | + android:gravity="center" |
| 167 | + android:text="7、ImageFilterView" /> |
| 168 | + |
| 169 | + <LinearLayout |
| 170 | + android:layout_width="match_parent" |
| 171 | + android:layout_height="wrap_content" |
| 172 | + android:layout_marginTop="20dp" |
| 173 | + android:gravity="center_horizontal" |
| 174 | + android:orientation="horizontal"> |
| 175 | + |
| 176 | + <androidx.constraintlayout.utils.widget.ImageFilterView |
| 177 | + android:id="@+id/iv_filter_view1" |
| 178 | + android:layout_width="100dp" |
| 179 | + android:layout_height="100dp" |
| 180 | + android:layout_gravity="center" |
| 181 | + android:scaleType="centerCrop" /> |
| 182 | + |
| 183 | + <androidx.constraintlayout.utils.widget.ImageFilterView |
| 184 | + android:id="@+id/iv_filter_view2" |
| 185 | + android:layout_width="100dp" |
| 186 | + android:layout_height="100dp" |
| 187 | + android:layout_gravity="center" |
| 188 | + android:layout_marginStart="20dp" |
| 189 | + android:scaleType="centerCrop" /> |
| 190 | + </LinearLayout> |
| 191 | + |
| 192 | + <!--8、ShapeableImageView--> |
| 193 | + <TextView |
| 194 | + android:layout_width="match_parent" |
| 195 | + android:layout_height="wrap_content" |
| 196 | + android:layout_marginTop="20dp" |
| 197 | + android:gravity="center" |
| 198 | + android:text="8、ShapeableImageView" /> |
| 199 | + |
| 200 | + <LinearLayout |
| 201 | + android:layout_width="match_parent" |
| 202 | + android:layout_height="wrap_content" |
| 203 | + android:layout_marginTop="20dp" |
| 204 | + android:layout_marginBottom="20dp" |
| 205 | + android:gravity="center" |
| 206 | + android:orientation="horizontal"> |
| 207 | + |
| 208 | + <com.google.android.material.imageview.ShapeableImageView |
| 209 | + android:id="@+id/iv_shapeAble_view1" |
| 210 | + android:layout_width="80dp" |
| 211 | + android:layout_height="80dp" |
| 212 | + android:layout_gravity="center" |
| 213 | + android:scaleType="centerCrop" |
| 214 | + android:src="@drawable/icon_cat_w" |
| 215 | + app:shapeAppearance="@style/roundedCornerStyle" /> |
| 216 | + |
| 217 | + <com.google.android.material.imageview.ShapeableImageView |
| 218 | + android:id="@+id/iv_shapeAble_view2" |
| 219 | + android:layout_width="80dp" |
| 220 | + android:layout_height="80dp" |
| 221 | + android:layout_gravity="center" |
| 222 | + android:layout_marginStart="10dp" |
| 223 | + android:scaleType="centerCrop" |
| 224 | + android:src="@drawable/icon_cat_w" |
| 225 | + app:shapeAppearance="@style/circleCornerStyle" /> |
| 226 | + |
| 227 | + <com.google.android.material.imageview.ShapeableImageView |
| 228 | + android:id="@+id/iv_shapeAble_view3" |
| 229 | + android:layout_width="80dp" |
| 230 | + android:layout_height="80dp" |
| 231 | + android:layout_gravity="center" |
| 232 | + android:layout_marginStart="10dp" |
| 233 | + android:padding="2dp" |
| 234 | + android:scaleType="centerCrop" |
| 235 | + android:src="@drawable/icon_cat_w" |
| 236 | + app:shapeAppearance="@style/roundedCornerStyle" |
| 237 | + app:strokeColor="@color/red" |
| 238 | + app:strokeWidth="4dp" /> |
| 239 | + |
| 240 | + <com.google.android.material.imageview.ShapeableImageView |
| 241 | + android:id="@+id/iv_shapeAble_view4" |
| 242 | + android:layout_width="80dp" |
| 243 | + android:layout_height="80dp" |
| 244 | + android:layout_gravity="center" |
| 245 | + android:layout_marginStart="10dp" |
| 246 | + android:padding="2dp" |
| 247 | + android:scaleType="centerCrop" |
| 248 | + android:src="@drawable/icon_cat_w" |
| 249 | + app:shapeAppearance="@style/circleCornerStyle" |
| 250 | + app:strokeColor="@color/red" |
| 251 | + app:strokeWidth="4dp" /> |
| 252 | + </LinearLayout> |
| 253 | + |
| 254 | + <LinearLayout |
| 255 | + android:layout_width="match_parent" |
| 256 | + android:layout_height="wrap_content" |
| 257 | + android:layout_marginBottom="20dp" |
| 258 | + android:gravity="center" |
| 259 | + android:orientation="horizontal"> |
| 260 | + |
| 261 | + <com.google.android.material.imageview.ShapeableImageView |
| 262 | + android:id="@+id/iv_shapeAble_view5" |
| 263 | + android:layout_width="80dp" |
| 264 | + android:layout_height="80dp" |
| 265 | + android:layout_gravity="center" |
| 266 | + android:scaleType="centerCrop" |
| 267 | + android:src="@drawable/icon_cat_w" /> |
| 268 | + |
| 269 | + <com.google.android.material.imageview.ShapeableImageView |
| 270 | + android:id="@+id/iv_shapeAble_view6" |
| 271 | + android:layout_width="80dp" |
| 272 | + android:layout_height="80dp" |
| 273 | + android:layout_gravity="center" |
| 274 | + android:layout_marginStart="10dp" |
| 275 | + android:scaleType="centerCrop" |
| 276 | + android:src="@drawable/icon_cat_w" /> |
| 277 | + |
| 278 | + <com.google.android.material.imageview.ShapeableImageView |
| 279 | + android:id="@+id/iv_shapeAble_view7" |
| 280 | + android:layout_width="80dp" |
| 281 | + android:layout_height="80dp" |
| 282 | + android:layout_gravity="center" |
| 283 | + android:layout_marginStart="10dp" |
| 284 | + android:scaleType="centerCrop" |
| 285 | + android:src="@drawable/icon_cat_w" /> |
| 286 | + |
| 287 | + <com.google.android.material.imageview.ShapeableImageView |
| 288 | + android:id="@+id/iv_shapeAble_view8" |
| 289 | + android:layout_width="80dp" |
| 290 | + android:layout_height="80dp" |
| 291 | + android:layout_gravity="center" |
| 292 | + android:layout_marginStart="10dp" |
| 293 | + android:scaleType="centerCrop" |
| 294 | + android:src="@drawable/icon_cat_w" /> |
| 295 | + </LinearLayout> |
| 296 | + |
| 297 | +<!-- <TextView--> |
| 298 | +<!-- android:id="@+id/tv_shape_able_1"--> |
| 299 | +<!-- android:layout_width="100dp"--> |
| 300 | +<!-- android:layout_height="100dp"--> |
| 301 | +<!-- android:layout_gravity="center"--> |
| 302 | +<!-- android:layout_marginTop="20dp"--> |
| 303 | +<!-- android:layout_marginBottom="10dp"--> |
| 304 | +<!-- android:gravity="center"--> |
| 305 | +<!-- android:text="shapeable" />--> |
156 | 306 | </LinearLayout>
|
157 | 307 |
|
158 | 308 | </androidx.core.widget.NestedScrollView>
|
|
0 commit comments