【发布时间】:2012-10-08 18:38:53
【问题描述】:
我想为自定义列表中的图像设置圆角。我使用了以下链接中提到的自定义小部件方法:
http://wiresareobsolete.com/wordpress/2011/08/quick-rounded-corners/#comments
图像角落变得模糊。任何人都可以给我一个解决方案,让我使用这个mentod拥有光滑的角落。
【问题讨论】:
标签: android imageview rounded-corners
我想为自定义列表中的图像设置圆角。我使用了以下链接中提到的自定义小部件方法:
http://wiresareobsolete.com/wordpress/2011/08/quick-rounded-corners/#comments
图像角落变得模糊。任何人都可以给我一个解决方案,让我使用这个mentod拥有光滑的角落。
【问题讨论】:
标签: android imageview rounded-corners
在drawable文件夹中创建一个文件。给它命名任何东西。并使用该文件设置imageview 背景。它会给你一个圆角。
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<stroke android:width="1dip"
android:color="@color/stroke_color"/>
<solid android:color="@color/white"/>
<padding
android:left="5dip"
android:top="5dip"
android:right="5dip"
android:bottom="5dip" />
<corners android:radius="5dip" />
</shape>
【讨论】: