Android ListView - 在 ListView 中添加 ListView 时使父级展开以显示所有子级
基本上,我有一个自定义 ListView,其中每个项目如下所示:
<行> <文本视图/> <按钮/> <
ListView/ >
每个item中的ListView默认是GONE,当单击按钮。一切似乎都工作正常,除了当 ListView 足够长可以滚动时,它只是被截断了。
http://img38.imageshack.us/img38/3269/listviewproblem.png
这是单个列表项的最大高度的问题吗?有没有办法强制列表项展开并强制子列表视图展开以显示所有子项?我做错了什么?
Basically, I have a custom ListView in which each item looks like:
<LinearLayout>
<Table> <Row> <TextView/> <Button /> </Row> </Table>
<ListView />
</LinearLayout>
The ListView in each item is GONE by default and is set to VISIBLE when the button is clicked. Everything seems to work fine with the exception that when the ListView is long enough to scroll, it is just kind of truncated.
http://img38.imageshack.us/img38/3269/listviewproblem.png
Is this a problem with the maximum height of an individual list item? Is there a way to force the list item to expand and force the child listview to expand to show all children? What am I doing wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对列表项使用单独的相对布局,
借助自定义高效适配器在列表活动中设置布局。
就这样。
use seperate relative layout for listitem
set the layout in list activity with the help of custom efficientadapter.
thats all.