Android ListFragment作为ActionBar选项卡。TextView元素不可单击。尝试了许多不同的解决方案

Android ListFragment作为ActionBar选项卡。TextView元素不可单击。尝试了许多不同的解决方案,android,android-layout,listview,clickable,Android,Android Layout,Listview,Clickable,我有一个ListFragment,它是ActionBar中的一个选项卡(许多选项卡之一)。问题是没有一个列表元素是可单击的(onListItemClick()从未被调用)。元素由两个文本视图组成。 我尝试了许多不同的方法,包括: android:drawSelectorOnTop="false" android:textIsSelectable="true" android:focusable="false" android:focusableInTouchMode="false" andr

我有一个ListFragment,它是ActionBar中的一个选项卡(许多选项卡之一)。问题是没有一个列表元素是可单击的(onListItemClick()从未被调用)。元素由两个文本视图组成。 我尝试了许多不同的方法,包括:

android:drawSelectorOnTop="false"
android:textIsSelectable="true" 
android:focusable="false"
android:focusableInTouchMode="false" 
android:clickable="false"
ListFragment布局:

<ListView xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@android:id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"/>

行项目布局:

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="80dp"
android:gravity="center_vertical"
android:orientation="vertical"
android:weightSum="2" >

<TextView
    android:id="@+id/tv_emergency_number_name"
    android:layout_width="fill_parent"
    android:layout_height="0dp"
    android:layout_marginLeft="10dp"
    android:layout_weight="1"
    android:gravity="center_vertical"
    android:textSize="17sp"
    android:textStyle="bold" />

<TextView
    android:id="@+id/tv_emergency_number"
    android:layout_width="fill_parent"
    android:layout_height="0dp"
    android:layout_marginLeft="5dp"
    android:layout_weight="1"
    android:gravity="center_vertical|left"
    android:textSize="15sp" />

</LinearLayout>


你知道它有什么问题吗?

为什么是android:clickable=“false”?有人提到这是解决办法之一。我试过android:clickable=“true”也不可点击你的意思是当你触摸textview时,什么都不会发生?无论我触摸textview还是list Row,都不会发生任何事情如果它在我的位置,我会使用常规片段并在其中使用带适配器的listview。。。你能发布你的片段布局和使用它的类吗?