After I place a HorizontalScrollView
surrounding the RelativeLayout
, the AutoCompleteTextView
is working, the dropdownlist is shown, but the list item is not clickable. So anything I can change?
<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>
I found this question TextView is not clickable inside scrollview in listview? but it isn't working, the ontouch event is not rise up.