我得到的ListView包含每行的ImageView和EditText。它们都是不可点击的,但onItemClick仅适用于ImageView,但不适用于EditText。请帮忙。
以下是ListView的行:
<ImageView
android:id="@+id/img_item_info"
android:cursorVisible="false"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:layout_width="@dimen/icon_32"
android:layout_height="@dimen/icon_32" />
<EditText
android:id="@+id/edt_browser_item"
android:singleLine="true"
android:background="@drawable/browser_textview_style"
android:layout_marginLeft="@dimen/margin_between_image_textview"
android:inputType="none"
android:scrollHorizontally="true"
android:cursorVisible="false"
android:clickable="false"
android:focusable="false"
android:focusableInTouchMode="false"
android:layout_width="fill_parent"
android:layout_height="wrap_content" >
</EditText>
</LinearLayout>
致以最诚挚的问候,
安东尼
答案 0 :(得分:0)
android:focusable="true"
android:focusableInTouchMode="true"
两个视图上的(Imageview和edittext)
现在,您可以选择图像视图并编辑编辑文本。
答案 1 :(得分:0)
为什么使用EditText并尝试阻止它?如果你想获得无法点击的EditText,只需使用TextView。