title: Curved border for list view
body: <p>I am newbie to android and java, i need to create a simple application in android. I have a Activity page in this activity. Here is my activity page </p>
  
  <pre><code>package com.tkcmu.dev;
  
  import java.io.BufferedReader;
  import java.io.IOException;
  import java.io.InputStreamReader;
  import java.net.URL;
  import java.net.URLConnection;
  import java.util.ArrayList;
  
  import org.apache.http.client.ClientProtocolException;
  import org.json.JSONArray;
  import org.json.JSONException;
  import org.json.JSONObject;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.widget.ArrayAdapter;
  import android.widget.ListView;
  
  public class tkcmu extends Activity {
      private ListView lv1;
  
      @Override
          public void onCreate(Bundle icicle)
          {
          super.onCreate(icicle);
          setContentView(R.layout.main);
  
  
          ArrayList&lt;String&gt; listItems = new ArrayList&lt;String&gt;();
  
          try {
              URL recentUrl = new URL(
                      "To some link");
              URLConnection tc = recentUrl.openConnection();
              BufferedReader in = new BufferedReader(new InputStreamReader(tc.getInputStream()));
  
              String line;
              while ((line = in.readLine()) != null) {
                  JSONArray ja = new JSONArray(line);
  
                  for (int i = 0; i &lt; ja.length(); i++) {
                      JSONObject jo = (JSONObject) ja.get(i);
                      listItems.add(jo.getString("content"));
                  }
              }
  
      }catch (ClientProtocolException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }catch (IOException e) {
                  e.printStackTrace();
  
              } catch (JSONException e) {
                  // TODO Auto-generated catch block
                  e.printStackTrace();
              }
  
  
          lv1=(ListView)findViewById(R.id.ListView01);
          // By using setAdpater method in listview we an add string array in list.
          lv1.setAdapter(new ArrayAdapter&lt;String&gt;(this,android.R.layout.simple_list_item_1 , listItems));
          }
  }
  </code></pre>
  
  <p>and my <code>main.xml</code> is like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:id="@+id/LinearLayout01"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"&gt;
  
      &lt;ListView
          android:id="@+id/ListView01"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_marginLeft="10sp"
          android:layout_marginRight="10sp"
          android:layout_marginTop="10sp"
          android:layout_weight="1"
          android:background="@drawable/customshape"
          android:cacheColorHint="#FFFFFF"
          android:clickable="true"
          android:clipToPadding="true"
          android:dividerHeight="1px"
          android:drawSelectorOnTop="false"
          android:focusable="true"
          android:focusableInTouchMode="true"
          android:footerDividersEnabled="true"
          android:headerDividersEnabled="true"
          android:longClickable="true" /&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>and also i have an <code>customshape.xml</code> in drawable which is</p>
  
  <pre><code> &lt;shape xmlns:android="http://schemas.android.com/apk/res/android"&gt;
      &lt;corners android:radius="10dp" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p>I got the result with the entire custom list section get curved but i want to get each row with a curved background. I have posted my entire code here(exclude <code>AndroidManifest.xml</code>) so this will be appreciated if anybody tell me exactly what changes i need to in this code. Any body have an idea about how to implement it.</p>