2012-10-08 140 views

回答

0

在可绘制文件夹中创建一个文件。命名任何事情。并通过使用该文件设置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> 
+1

我试过了,但图像没有填满宽度。图像和形状具有不同的宽度。所以形状突出。 –