我想为自定义列表中的图像获得圆角。我使用了以下链接中提到的自定义小部件方法:
http://wiresareobsolete.com/wordpress/2011/08/quick-rounded-corners/#comments
图像角落变得模糊。任何人都可以给我一个解决方案,让我使用这个mentod拥有光滑的角落。
我想为自定义列表中的图像获得圆角。我使用了以下链接中提到的自定义小部件方法:
http://wiresareobsolete.com/wordpress/2011/08/quick-rounded-corners/#comments
图像角落变得模糊。任何人都可以给我一个解决方案,让我使用这个mentod拥有光滑的角落。
在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>