title: android how to set border in listview
body: <p>This is my code which work fine, I just want to add border at top and bottom of <code>listview</code>. So, My question is how to add border at top and bottom of <code>listview</code>. Note: I just want to add only border and where I can place border? Any help will be appreciated. Thanks</p>
  
  <pre><code>&lt;ListView android:id="@+id/listCategory"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:fadeScrollbars="true"
            android:fastScrollEnabled="true"
            android:listSelector="@drawable/listview_selector"
            android:dividerHeight="1dp"
            android:layout_below="@+id/gridlayout"
            android:visibility="gone"/&gt;
  </code></pre>
  
  <p><strong>listview_selector.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android" &gt;
  &lt;item android:state_focused="true" android:drawable="@drawable/listview_selector_focussed" /&gt;
  &lt;item android:state_pressed="true" android:drawable="@drawable/listview_selector_pressed" /&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p><strong>listview_selector_focussed.xml</strong></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;gradient android:startColor="#0a89f1" android:endColor="#56768d" android:angle="90" /&gt;
  &lt;/shape&gt;
  </code></pre>
  
  <p><strong>listview_selector_pressed.xml</strong></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;gradient android:startColor="#0a89f1" android:endColor="#56768d" android:angle="90" /&gt;
  &lt;/shape&gt;
  </code></pre>