Android - 在列表视图之间切换而不改变布局?
我不是在这里寻找确切的代码,只是一个关于要寻找什么以及我应该阅读什么的方向,以便我可以弄清楚这一点。
我有一个布局,我想保持静态,只有列表视图根据从列表中选择的内容而变化。我已重新加载列表中的数据,但我希望选择之间有精美的过渡动画,并且希望应用程序在按回键时转到上一个菜单。
有人建议使用视图切换器,这看起来很棒,但我仍然不确定如何使用常规行布局填充布局中的列表视图,然后在选择时进行动画过渡到自定义行。另外,视图切换器似乎仅限于两个视图,因此当我想更深入地了解一些菜单时,这可能是一个限制。
最好,我想将每个菜单放在它自己的类中,以便我可以在该类中填充它,如果可能的话......
希望这不是太模糊,但如果是的话我会非常乐意进一步解释一下我自己。
I'm not looking for exact code here, just a direction on what to look for and what I should be reading about so I can figure this out.
I have a layout that I would like to remain static, with only the listview changing depending on what's selected from the list. I've reloaded data in the list, but I would like the fancy transition animations between choices, and would like the app to go to the previous menu when pressing back.
Someone suggested using a viewswitcher, which seems like it'd be great, but I am still unsure about how to fill a listview in a layout with a regular row layout, then on selection do an animated transition to a custom row. Also, it seems the viewswitcher is limited to two views, so it may be a limitation when I want to go a few menus deeper.
Preferably, I'd like to put each menu in it's own class so that I can handle filling it in that class, if possible...
Hope this isn't too vague, but if it is I'll be more than happy to explain myself further.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不知道这是否是您的意思,但您是否尝试过显示和隐藏视图?
希望这就是你的意思:)
Don't know if it's what you meant but have you tried showing and hiding the views?
Hope it's what you meant :)