UI

android shapeableimageview的使用

2021-06-25  本文已影响0人  hao_developer

效果


image.png

依赖

implementation 'com.google.android.material:material:1.2.1'
image.png
<com.google.android.material.imageview.ShapeableImageView

    android:layout_width="wrap_content"

    android:layout_height="wrap_content"

    android:layout_margin="10dp"

    android:src="@mipmap/ic_avatar" />

<!--ShapeableImageView 圆角-->

<style name="RoundedStyle">

    <item name="cornerFamily">rounded</item>

    <item name="cornerSize">10dp</item>

</style>

属性

关于xml属性,我也做了一个整理,属性不多,只有4个。

image.png
这位好友的总结(https://www.jianshu.com/p/19e3c3b77e93)
上一篇 下一篇

猜你喜欢

热点阅读