I am implementing a list view like this for Android.
Without worrying about selectors and the thin strip on the left of each item, the background layout drawable for list items would be:
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<stroke android:width="1dp" android:color="#000000" />
<corners
android:bottomRightRadius="27dp"
android:topRightRadius="27dp" />
</shape>
And I'm calling it list_border.xml
and it resides in the drawable folder.
I have tried to set it as the background for the listview
<?xml version="1.0" encoding="utf-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/list_padding"
android:paddingRight="@dimen/list_padding"
android:divider="@drawable/list_border"/>
and as the background for each list item
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:divider="@drawable/list_border" >
<ImageView
android:id="@+id/menu_icon"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:src="@drawable/arrow1_e" />
<org.bitbucket.infovillafoundation.denko.customui.MyanmarTextView
android:id="@+id/menu_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/menu_icon" />
</RelativeLayout>
But the listview has not changed to reflect the new background. Is anything wrong with it?