`
coding1688
  • 浏览: 232029 次
  • 来自: 上海
社区版块
存档分类
最新评论

ListView的行中加了按钮的注意事项

 
阅读更多

在ListView中,如果在行中加了按钮之类的,默认情况下,那么点击该行的事件就不会触发了,需要做些设置:

<RelativeLayout>中

android:descendantFocusability="blocksDescendants"

<ImageButton>中

android:focusable="false"

 

另外需要单独编写BaseAdapter的子类来实现行的显示,对应的按钮的事件处理也是在该子类中进行设置的。

详细请参考下面的资料:

http://blog.csdn.net/xinqiqi123/article/details/6458030

 

 

0
0
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics