安卓:对意见标签堆栈管理? [英] Android: stack management for views in a tab?

查看:97
本文介绍了安卓:对意见标签堆栈管理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看到一些答案在这里美元的活动选项卡的内容p $ PFER意见。纠正我,如果我错了。我的理解是,通过切换出来的观点,这是可能的,以保持流动导航选项卡内(更人性化,我认为)。但我不知道如何管理视图栈,然后在后面的按钮事件的情况。这也可能导致一个巨大的活动有大量的意见,这可能不是很好。

所以,我想知道到底为什么意见,内容是之前,我改变我目前的应用这个pferred $ P $。

谢谢,


解决方案

  

我看到一些答案在这里preFER意见
  在活动选项卡的内容。


很多的会是我的。


  

用户更加友好,我觉得


我完全在这一点上不同意。我觉得试图标签里面假的导航是大多数移动应用程序是错误的。


  

另外这可能会导致一个巨大的
  有大量的意见活动,
  这可能不是很好。


如果它是从一个存储器的观点来看过大,它会被太从用户的角度来看复杂的,所以必须分成独立活动(无标签)。


  

所以,我想知道到底为什么意见
  内容preferred之前,我改变
  我目前的应用程序这一点。


使用活动作为选项卡的内容,使所有的疑虑加重。使用活动作为选项卡的内容占用更多的内存,因为多个查看超越那些创造了你在活动声明。使用活动作为选项卡的内容占用更多的堆栈空间,在Android上最precious商品之一几层。使用活动作为选项卡的内容会占用CPU时间,因为Android已经解开你的活动来获得在查看它里面,反正

我会翻转过来,这个问题:没有人有没有任何优势展示给我有活动作为选项卡的内容是远远超过这些缺点

I see some answers here prefer views over activities as contents of tabs. Correct me if I am wrong. My understanding is that by switching out views, it's possible to keep the navigation flow inside a tab (more user friendly, I think). But I wonder how to manage the view stack then in case of the back button events. Also this could cause one giant Activity with large amount of views, which might not be good.

So I wish to know why exactly views as contents is preferred before I change my current application to this.

Thanks,

解决方案

I see some answers here prefer views over activities as contents of tabs.

A lot of those would be mine.

more user friendly, I think

I completely disagree on this point. I feel that trying to fake navigation inside of tabs is a mistake for most mobile applications.

Also this could cause one giant Activity with large amount of views, which might not be good.

If it is too big from a memory standpoint, it will be too complicated from a user's standpoint, and so should be broken up into independent activities (without tabs).

So I wish to know why exactly views as contents is preferred before I change my current application to this.

Using Activities as the contents of tabs makes all of your concerns worse. Using Activities as the contents of tabs takes up more memory, because more Views get created beyond those you declare in an activity. Using Activities as the contents of tabs takes up a few layers more of stack space, one of the most precious commodities in Android. Using Activities as the contents of tabs takes up CPU time, as Android has to unravel your activity to get at the View inside of it, anyway.

I would flip the issue around: nobody has yet to demonstrate to me any advantage to having Activities as the contents of tabs that outweighs these disadvantages.

这篇关于安卓:对意见标签堆栈管理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆