有没有活动的人数在Android应用程序有关系吗?应用程序、人数、关系、Android

2023-09-12 05:04:33 作者:依心而行

我开发一个Android应用程序。我已经越过20多个活动。所以我有点担心它。我的意思是如果在一个Android应用程序更多的活动,不会影响应用程序的速度一样,内存或任何其他问题?

I am developing an Android app. I have already crossed more than 20 Activities. So I am bit concerned about it. I mean if there are more Activities in an Android app, does it affect the performance of App like Speed, Memory or any other issue?

虽然这不是一个标准的问题,但我仍然觉得它的东西可能帮助别人过

推荐答案

是苏拉杰更多活动将影响性能 活动是一个框架/窗口的GUI工具包的等价物。它占用了屏幕(减去在上面的状态和标题栏)的整个绘制区域。活动是为了显示用户界面,并从用户获得输入 一个活动(主叫活动)可以通过两种方式产生另一个活动(子活动):

Yes Suraj more activities will affect performance An activity is the equivalent of a Frame/Window in GUI toolkits. It takes up the entire drawable area of the screen (minus the status and title bars on top). Activities are meant to display the UI and get input from the user An Activity (calling-Activity) can spawn another Activity (sub-Activity) in 2 ways:

消防和忘记 - 创建活动(意向),并启动它 在异步回调 - 创建一个事件(意向),启动它,并等待它的响应(主叫活动的)的回调方法

所以,活动的效果将取决于您的设备,它的处理器和内存等性能 即使任何活动将留在堆栈并没有完成,然后它会影响设备的性能。 即使你要看一看的安全措施。

So the effect of activities will depend on performance of your device, its processor and memory etc. Even if any activity will remain in stack and not finish then it affects device performance. Even you have to take a look at security measures.