我有一个listView。 ListView的每一行/项目包含2个视图a TextView和ImageView。我希望只有ImageView可以聚焦和点击,textView不应该是可聚焦和可点击的。图像视图列表视图项目
Eachrow.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" >
<TextView
android:id="@+id/textViewEachBlockedKeyword"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:text="Keyword"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:layout_marginLeft="5dp"
android:textAppearance="?android:attr/textAppearanceMedium" />
<ImageView
android:id="@+id/imageViewBlockKeywordDelete"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_weight="3.1"
android:layout_marginLeft="2dp"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:src="@drawable/delete" />
</LinearLayout>
如何做到这一点? 感谢
具有u尝试设置textview中的可点击属性是否为false? – Ajay 2013-02-20 09:33:32