英文:
In Jetpack Compose with Navigation Compose, do I no longer need to create a new activity for each screen?
问题
我不是一位优秀的Android开发专家,我仍在学习。当我开始学习Jetpack Compose时,我有这个问题。以前,在View系统上,当我需要创建一个新屏幕时,我会创建一个新的活动(activity)。但现在有了Navigation Compose,我觉得这样做没有必要。我理解得对吗?随着Navigation Compose的出现,对于大多数应用程序来说,一个活动足够了(除了一些特殊情况)吗?
英文:
I'm not a good Android Dev specialist, I'm still learning. When I started learning Jetpack Compose, I had this question. Previously, on the View system, when I needed to create a new screen, I created a new activity. But now that Navigation Compose exists, I don't see the point in doing so. Do I understand correctly that with the advent of Navigation Compose, one activity will be enough for most apps (except for some specific cases)?
答案1
得分: 1
在Jetpack Compose中,使用一个Activity和多个屏幕非常容易,正如您在大多数应用中提到的那样,单个Activity通常足以完成所有工作,随着您对Jetpack Compose的熟悉,您会更倾向于使用单个Activity和多个屏幕。
英文:
Yes in Jetpack compose it is very easy to use one Activity and multiple screen and it uses very often as you mentioned in most app single activity will be enough to do all of your work and as you get used to Jetpack compose you prefer to use single activity and multiple screen.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论