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