关于ListView如何使其获得焦点

[复制链接]
查看11 | 回复2 | 2015-9-7 17:07:20 | 显示全部楼层 |阅读模式
1.将ListView的Item Layout的子控件focusable属性设置为false 2.对Item Layout的根控件android:descendantFocusability="blocksDescendant" 例如:<RelativeLayoutxmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical"android:layout_width="match_parent"android:layout_height="wrap_content"android:padd...
回复

使用道具 举报

千问 | 2015-9-7 17:07:20 | 显示全部楼层
在布局文件中的layout里加入这句话即可android:descendantFocusability="blocksDescendants"...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行