ITeye博客

关于ListView中假如Button,EditText无法响应问题

四眼蛤蟆 · 2011-03-03 20:05 · Android · 编程语言 · Android · Markdown

个人成功试验结果:

为Button或者EditText加上一个布局;

 

<RelativeLayout
		android:layout_width="wrap_content"
		android:layout_height="wrap_content"
		android:descendantFocusability="blocksDescendants">
		<Button
			android:id="@+id/attention_btn"
			android:layout_width="wrap_content"
			android:layout_height="wrap_content"
			android:background="@drawable/btn_attention_normal"
			android:layout_alignParentRight="true"
			android:focusable="false"/>
</RelativeLayout>

 

其中两个重要的属性:

RelativeLayout:android:descendantFocusability="blocksDescendants"

Button:android:focusable="false"

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。