哪个选项卡更好的选择?
我已经阅读了带有活动和视图的选项卡的不同示例。我知道每种方法都有一定的局限性。目前我想知道哪一个更适合我的问题。我有 4 个选项卡,每个选项卡都有相同的列表视图,但每个列表的内容会有所不同。
我尝试过以下方法: 创建选项卡活动并为列表提供单个活动,并为每个选项卡加载具有不同内容的相同列表。不知何故,这似乎不是正确的方法。
帮我找到一个好的方法。谢谢快乐编码!!
I have read different examples for tabs with activities and views. I know there are certain limitations for each. Currently i want to know which one would be a better option for my problem. I have 4 tabs and each of them have the same list view but the content of each list would be different.
I have tried the following approach:
Creating the tab activity and having single activity for list and loading the same list for each tab with different content altogether. Somehow this does not seem to be correct way.
Help me find a good approach. Thanks Happy Coding!!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
最好为每个列表实施不同的活动。
It's better to implement a different activity for each list.
对不同的选项卡使用不同的活动。像这样:
看看 android 开发者网站。
Use different activity for different tab.Like this:
And have a look android developer site.
您可以简单地更新列表的内容,而不在单击选项卡时更新视图。
You could simply update the content of the list and don't update the view when you click the tabs.