How to setup the attribute to achieve the rounded corner for each item in the ListView
?
Please kindly give an example if you can, thanks!
for example: http://www.flickr.com/photos/jaxxdotorg/3640222441/in/set-72157619952823330/
EDIT: That's my code here for the answer.
<?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>
You can achieve this with shapes.
Checkout the Shape Drawable documentation
The corner element specifies the size of the rounded corner. Now all you need to do is specify this drawable as the background to each list element.