I am trying to make listview items rectangular shape with rounded corners but what's happening with me, only first row comes with rounded corners on upper part, rest of the child listview items comes in rectangular shapes with no rounded corners. I don't know why this is happening.
Here is my listview codes:
<ListView
android:id="@+id/listViewdoctorwithappointment"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="7dp"
android:layout_marginRight="7dp"
android:layout_marginTop="10dp"
android:minHeight="80dp"
android:background="@drawable/customshapeduplicate"
android:cacheColorHint="@android:color/transparent"
android:divider="#4F94CD"
android:dividerHeight="10dp"
android:smoothScrollbar="true"
android:listSelector="@drawable/selector"
android:scrollbars="none" >
</ListView>
And Here is my customshapeduplicatefile is this:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="#ffffff" android:endColor="#ffffff"
android:angle="270"/>
<corners android:bottomRightRadius="10dp" android:bottomLeftRadius="10dp"
android:topLeftRadius="10dp" android:topRightRadius="10dp"/>
</shape>
And this is the image: