是否可以更改 ListView 中项目的大小?
我有一个包含几个项目的 ListView
。是否可以更改 ListView
中所选项目的大小。例如,我想展开所选项目以显示一些按钮。
感谢您提前提供的帮助。
I have a ListView
with few items. Is it possible to change size of the selected item in the ListView
. For example, I want to expand selected item to show some buttons.
I appreciate you for help in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在您不想要的项目中将这些按钮的可见性设置为 View.GONE。每当您需要它们时,请将它们设置为 View.VISIBLE。通过将它们设置为 View.GONE,android 不会将它们包含在任何类型的测量中(宽度或高度),并且看起来不应该存在任何东西。
Set the visibility of these buttons as View.GONE in the items that you don't want it. Whenever you need them set them as View.VISIBLE. By setting them as View.GONE android doesn't include them in any kind of measurement (width or height) and it looks like nothing was supposed to be there.