Android提取图片的主要颜色作为图片阴影的控件

xiaoxiao2021-02-28  108

PaletteImageView:自定义的控件,可以为图片增加阴影效果,自定义图片圆角的角度(0-180)

导包:

    compile 'com.dingmouren.paletteimageview:paletteimageview:1.0.1'

布局文件:

<com.dingmouren.paletteimageview.PaletteImageView android:id="@+id/palette1" android:layout_width="180dp" android:layout_height="180dp" app:paletteSrc="@mipmap/hai" /> 设置圆角度数:

paletteImageView1.setCornerRadius(180);

转载请注明原文地址: https://www.6miu.com/read-30020.html

最新回复(0)