带阴影的圆形图像

时间:2016-05-14 10:30:07

标签: android android-studio shadow circleimage

我想实现带有一侧阴影的圆形图像,没有任何边框,如[this] [1],我试过但不显示满意的视图我该如何实现呢?请大家帮忙解决这个问题

1 个答案:

答案 0 :(得分:1)

要制作循环ImageView,请在布局XML中添加CircularImageView,并在项目中添加CircularImageView库,或者也可以通过Gradle抓取它。

compile 'com.mikhaellopez:circularimageview:3.0.2'

添加到xml布局

<com.mikhaellopez.circularimageview.CircularImageView
    android:layout_width="250dp"
    android:layout_height="250dp"
    android:src="@drawable/image"
    app:civ_border_color="#EEEEEE"
    app:civ_border_width="4dp"
    app:civ_shadow="true"
    app:civ_shadow_radius="10"
    app:civ_shadow_color="#8BC34A"/>

您可以轻松添加阴影。

相关问题