Custom listactivity divider
<p>I have ListActivity consist of many rows , im trying to customize the divider in between rows , so i can give the divider : corners radius , change its color and apply border and so on ,</p>

<p>i tried to refer it to drawable shape layout but its not work , gave force close .</p>

<p>listactivity code : </p>

<pre><code>   public class Rows extends ListActivity {
      String classes[] = { "row1", "row2", "row3",  "row4", "row5"};                    
  @Override
      protected void onCreate(Bundle savedInstanceState) {
        this.requestWindowFeature(Window.FEATURE_NO_TITLE); 
       // TODO Auto-generated method stub
         super.onCreate(savedInstanceState);

  ListView lv = getListView();   
  lv.setCacheColorHint(0);  
  lv.setSelector(android.R.color.transparent); 
  lv.setDivider(new ColorDrawable(this.getResources().getColor(R.drawable.divider)));  
  lv.setPadding(20, 0, 20, 0);
  lv.setVerticalScrollBarEnabled(false);
  lv.setBackgroundResource(R.drawable.list_background);

setListAdapter(new MyArrayAdapter(this, classes));  }
</code></pre>

<p>divider.xml code :</p>

<pre><code> &lt;?xml version="1.0" encoding="utf-8" ?&gt; 
   &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"
       android:shape="rectangle"&gt;
    &lt;stroke android:width="5dp" android:height="5dp" android:color="#B22222" /&gt; 
    &lt;solid android:color="#FFFFFF" /&gt; 
    &lt;padding android:left="10dp"  android:right="10dp"  /&gt; 
    &lt;corners android:radius="10dp" android:bottomRightRadius="5dp"
       android:bottomLeftRadius="5dp" android:topLeftRadius="10dp"
         android:topRightRadius="10dp" /&gt; 
   &lt;/shape&gt;
</code></pre>

<p>any help will be appreciated, thabks</p>
