title: how to add border on listview?
body: <p>below is my code which display listview but problem is when i focus listview border will remove see this image border will show  <a href="http://imgur.com/BZVqG7w" rel="nofollow">http://imgur.com/BZVqG7w</a>  when i focus  border will remove  <a href="http://imgur.com/u6rBziB" rel="nofollow">http://imgur.com/u6rBziB</a>     why is remove when focus? i didnot get problem help me plzz</p>
  
  <pre><code>             &lt;LinearLayout
          android:id="@+id/lytContent"
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_above="@+id/txtCopyright"
          android:layout_marginTop="10dp"
           android:background="@drawable/border2" 
          android:layout_below="@+id/lytTitlebar"
          android:orientation="vertical" &gt;
  
  
  
          &lt;ListView
              android:id="@+id/listMainMenu"
              android:layout_width="fill_parent"
              android:layout_height="wrap_content"
  
              android:listSelector="@drawable/listview_selector"
              android:dividerHeight="1dip"
              android:fadeScrollbars="true" /&gt;
      &lt;/LinearLayout&gt;
  
  
       &lt;!---listview_selector.xml ----&gt;&gt;&gt;&gt;
  
  
          &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/listviewborder" /&gt;
  
     &lt;item
       android:state_pressed="true"
     android:drawable="@drawable/listview_selector_pressed" /&gt;
  
          &lt;/selector&gt;
  
  
  
  
    &lt;------- /listviewborder.xml----&gt;
  
  
         &lt;?xml version="1.0" encoding="utf-8"?&gt;
   &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item&gt; 
  &lt;shape android:shape="rectangle"&gt;
    &lt;solid android:color="#000000" /&gt; 
  &lt;/shape&gt;
    &lt;/item&gt;   
  &lt;item android:left="1dp" android:right="1dp"  android:top="1dp" android:bottom="1dp" 
      &gt;  
   &lt;shape android:shape="rectangle"&gt; 
   &lt;gradient
   android:startColor="#0a89f1"
  android:endColor="#56768d"
   android:angle="90" /&gt;
  &lt;/shape&gt;
    &lt;/item&gt;    
      &lt;/layer-list&gt; 
  
  
  
  &lt;------------listview_selector_pressed.xml--------&gt;
  
  
  
  
  
  
             &lt;layer-list xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item&gt; 
    &lt;shape android:shape="rectangle"&gt;
    &lt;solid android:color="#000000" /&gt; 
    &lt;/shape&gt;
    &lt;/item&gt;   
    &lt;item android:left="1dp" android:right="1dp"  android:top="1dp" android:bottom="1dp" 
        &gt;  
   &lt;shape android:shape="rectangle"&gt; 
   &lt;gradient
     android:startColor="#0a89f1"
    android:endColor="#56768d"
    android:angle="90" /&gt;
     &lt;/shape&gt;
     &lt;/item&gt;    
    &lt;/layer-list&gt; 
  
  
  
  
  
  
                 public View getView(int position, View convertView, ViewGroup parent) {
      // TODO Auto-generated method stub
      ViewHolder holder;
  
      if(convertView == null){
          LayoutInflater inflater = (LayoutInflater) activity
                  .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
          convertView = inflater.inflate(R.layout.main_menu_item, null);
          holder = new ViewHolder();
  
          convertView.setTag(holder);
      }else{
          holder = (ViewHolder) convertView.getTag();
      }
  
      holder.txtText = (TextView) convertView.findViewById(R.id.txtText);
  
  
      holder.txtText.setText(HomeMenu.Category_name.get(position));
  
      return convertView;
  
  
  
  
  
         &lt;----- main_menu_item.xml ----------&gt;
  
  
  
            &lt;?xml version="1.0" encoding="utf-8"?&gt;
     &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="fill_parent"
  android:layout_height="wrap_content"
  
  
  
  android:padding="10dp"&gt;
          &lt;TextView 
              android:id="@+id/txtText"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:textColor="@color/text"
  
              android:textSize="20sp"
  
  
              android:layout_alignParentLeft="true"
              android:layout_centerVertical="true"/&gt;
          &lt;ImageView 
              android:id="@+id/imgNav"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:src="@drawable/nav_next1"
              android:layout_alignParentRight="true"
              android:layout_centerVertical="true"/&gt;
               &lt;/RelativeLayout&gt;
  </code></pre>