当前位置:   article > 正文

jetpack(androidx)的constraintlayout2新功能的使用之ImageFilterView圆形与圆角图片的使用_imagefilterview round 和radius

imagefilterview round 和radius

使用方法:导入implementation 'androidx.constraintlayout:constraintlayout:2.0.1'

 

1.圆角和圆形ImageView

圆形

  1. <androidx.constraintlayout.utils.widget.ImageFilterView
  2.     android:layout_width="58dp"
  3.     android:layout_height="58dp"
  4.     android:src="@mipmap/ic_launcher"
  5.     app:roundPercent="1" />

圆角

  1. <androidx.constraintlayout.utils.widget.ImageFilterView
  2.     android:layout_width="match_parent"
  3.     android:layout_height="250dp"
  4.     app:round="16dp" />

1.roundPercent:值为1是圆形,值为0是方形

2.round:是圆角的度数

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/816420
推荐阅读
相关标签
  

闽ICP备14008679号