Too many Activities in Android?

后端 未结 6 1974
春和景丽
春和景丽 2021-02-13 14:24

When i started my Android project i had a misunderstanding that every screen that\'s shown in the application must be a new activity. Now i am finished with the project , i have

6条回答
  •  忘掉有多难
    2021-02-13 15:03

    While creating complex applications you definite need to create many activities. So it depends on your application how many activities you need. No of activities in a project do not affect the performance.

    The effect is produced by the number of activities in the stack of your android. So it is better to keep 5-6 activities in the stack(Finish activities if they are not needed any more).

    So create as many Activities as your application demands but keep smaller no of Activities open at a time.

提交回复
热议问题