below is my code which display listview but problem is when i focus listview border will remove see this image border will show http://imgur.com/BZVqG7w when i focus border will remove http://imgur.com/u6rBziB why is remove when focus? i didnot get problem help me plzz
<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" >
<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" />
</LinearLayout>
<!---listview_selector.xml ---->>>>
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
<item
android:state_focused="true"
android:drawable="@drawable/listviewborder" />
<item
android:state_pressed="true"
android:drawable="@drawable/listview_selector_pressed" />
</selector>
<------- /listviewborder.xml---->
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#000000" />
</shape>
</item>
<item android:left="1dp" android:right="1dp" android:top="1dp" android:bottom="1dp"
>
<shape android:shape="rectangle">
<gradient
android:startColor="#0a89f1"
android:endColor="#56768d"
android:angle="90" />
</shape>
</item>
</layer-list>
<------------listview_selector_pressed.xml-------->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle">
<solid android:color="#000000" />
</shape>
</item>
<item android:left="1dp" android:right="1dp" android:top="1dp" android:bottom="1dp"
>
<shape android:shape="rectangle">
<gradient
android:startColor="#0a89f1"
android:endColor="#56768d"
android:angle="90" />
</shape>
</item>
</layer-list>
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;
<----- main_menu_item.xml ---------->
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:padding="10dp">
<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"/>
<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"/>
</RelativeLayout>