在
每个Item中加入
android:descendantFocusability="blocksDescendants"
用来屏蔽focus 事件。使Item可以进行Foucs
<?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="85dp"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:descendantFocusability="blocksDescendants"
android:background="@drawable/windowlist_item_selector" >
<ImageView
android:id="@+id/loading"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/favico"
android:focusable="false"
android:layout_alignParentLeft="true"
/>
<TextView
android:id="@+id/text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="14dip"
android:layout_marginLeft="10dp"
android:focusable="false"
android:layout_toRightOf ="@id/loading"
/>
<Button
android:id="@+id/close"
android:background ="@drawable/windowlist_close_button_selector"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_alignParentRight="true"
android:focusable="false"
android:clickable="true"
/>
</RelativeLayout>