android中tablelayout的一部分的滚动视图
我想在android中滚动一些行的tablelayout。但是,当我尝试为该特定行采用新的表格布局时,它仍然没有滚动该新表格。我想通过 xml 文件而不是 java 代码来做到这一点。我使用的是安卓4.0.3。请帮忙。
I want to scroll some rows of tablelayout in android. But when I tried to take a new table layout for that particular row, it is still not scrolling that new table. And I want to do that via xml file not from java code. I am using android 4.0.3. Please Help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果我理解这个问题,您希望表格中的一些单元格可以水平滚动其内容。我也有同样的问题。这似乎是由于表格乐于比屏幕更宽,因此允许水平滚动视图足够宽以包含其所有内容,这意味着它不需要滚动。
我通过以编程方式设置水平滚动视图的宽度解决了这个问题,这样它就不会离开屏幕。
If I'm understanding the question you want to have some cells of a table that can scroll their contents horizontally. I was having the same issue. It seems to be caused by the table being happy to be wider than the screen, so the horizontal scroll view is allowed to be wide enough to encompass all it's content, meaning it doesnt need to scroll.
I solved the issue by programmatically setting the width on the horizontal scroll view so that it wouldnt go off the screen.