ViewPager可以替代ActivityGroup吗?
我正在做一个类似于 Viber 或 Linphone 的应用程序,基本上是一个 SIP 应用程序。我在屏幕底部有一个主选项卡主机。在每个选项卡中我设置了不同的活动(例如历史活动)。我已经使用 ActivityGroup 完成了此操作。这是正确的做法吗?正如我所看到的,ActivityGroup 已被弃用,但我不想使用片段(大多数手机不支持 API 11)。我见过 ViewPager 组件,是否也可以作为替代方案?我想我可以用手指将 onFlip 事件更改为特定按钮上的 onClick 事件。我使用 Activitygroup 做得正确吗,还是应该更改为其他组件?
I am doing an application similar to Viber or Linphone, a SIP application basically. I have a main tabhost at the bottom of the screen. And inside each tab I set different activities(for example the historic). I have done this using ActivityGroup. Is that the right approach? As I have seen that ActivityGroup is deprecated, but I dont want to use fragments(most of phones dont support API 11). I have seen the ViewPager component, could be also an alternative? I guess I can change the event onFlip with my finger for the onClick on a specific botton. Am I doing it right using Activitygroup, or should I change to another component?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
通常,您所描述的那种事情可以使用简单的 TabActivity 来完成。
我不确定您为什么决定使用 ActivityGroup,但是关于您对片段的犹豫 - 您可以使用 兼容性库,它将为您提供对旧平台的片段支持,尽管有一些限制。
Usually the kind of thing you are describing can be done using a simple TabActivity.
I'm not sure why you decided to use ActivityGroup, but regarding your hesitation related to fragments - you can use the Compatibility library, which will give you fragment support for older platforms, albeit with some limitations.