shi*_*ami 1 android listview rounded-corners
如何设置属性以实现每个项目的圆角ListView?如果可以的话,请举个例子,谢谢!
例如:http: //www.flickr.com/photos/jaxxdotorg/3640222441/in/set-72157619952823330/
编辑:这是我的代码在这里的答案.
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:startColor="#ffff"
android:endColor="#fddd"
android:angle="270" />
<corners
android:radius="13dp" />
<stroke
android:width="1dp"
android:color="#feee" />
</shape>
Run Code Online (Sandbox Code Playgroud)
你可以通过形状实现这一目标.
<?xml version="1.0" encoding="utf-8"?>
<shape
xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:radius="12dp"/>
<stroke
android:width="1dp"
android:color="@color/blue" />
</shape>
Run Code Online (Sandbox Code Playgroud)
角元素指定圆角的大小.现在您需要做的就是将此drawable指定为每个列表元素的背景.
| 归档时间: |
|
| 查看次数: |
7276 次 |
| 最近记录: |