Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/225.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/meteor/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 自动完成文本视图';在HorizontalScrollView中不可单击的项目?_Android - Fatal编程技术网

Android 自动完成文本视图';在HorizontalScrollView中不可单击的项目?

Android 自动完成文本视图';在HorizontalScrollView中不可单击的项目?,android,Android,在我将水平滚动视图放置在RelativeLayout周围后,自动完成文本视图工作,下拉列表显示,但列表项不可单击。有什么我可以改变的吗 <HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="fill_parent" android:layout_height="fill_parent"> <RelativeLay

在我将
水平滚动视图
放置在
RelativeLayout
周围后,
自动完成文本视图
工作,下拉列表显示,但列表项不可单击。有什么我可以改变的吗

<HorizontalScrollView xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent">
<RelativeLayout 
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" 
    >

    <ImageView
        android:id="@+id/favicon"
        android:layout_width="20dp"
        android:layout_height="24dp"
        android:layout_marginLeft="4dp"
        android:scaleType="fitXY"
        android:src="@drawable/ic_launcher" 
        android:paddingTop="3dp"
        android:contentDescription="favicon"
        />

    <TextView
        android:id="@+id/text1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginLeft="26dp"
        android:text=""
        android:singleLine="true"
        android:ellipsize="end"
        android:textSize="16sp"
        android:textStyle="bold" 

        />

    <TextView
        android:id="@+id/text2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/text1"
        android:singleLine="true"
        android:ellipsize="end"
        android:textSize="14sp" 
        android:text=""
        android:paddingBottom="3dp"
        />

</RelativeLayout>
</HorizontalScrollView>

我发现了这个问题
但它不起作用,ontouch事件没有上升。

滚动占据了你的焦点,添加


“后代可浏览性:BlocksSendants”
到您的scrollview标签中

不要将Android添加到您的问题标题中,底部的标签已经足够了。