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

来源:互联网 发布:金正恩 知乎 编辑:程序博客网 时间:2024/06/07 07:55

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);

0 0
原创粉丝点击