我去了Kotlin Android开发的YouTube学院,并使用Google Firebase创建了一个半复杂的应用程序,我使用需要绑定的扩展AbledableListView在某些代码中遇到了障碍。
在进行了一些研究之后,人们似乎使用碎片而不是单独的活动,因为过去十年。
我应该将所有活动(除了主要)转换为碎片吗?
是否有性能好处?
进行这种更改有多困难?
I went to the YouTube Academy for Kotlin Android Development and created a semi complex app with Google FireBase, I have hit a roadblock in some code using an ExpandableListView that requires bindings.
After doing some research It seems that people use fragments instead of separate activities since like the past 10 years.
Should I convert all of my activities (besides main) to fragments?
Is there performance benefits?
How difficult is it to make this change?
发布评论
评论(1)
实际上,这更多的是开发利益,而不是绩效益处。碎片和活动不仅是显示一些屏幕。这更多。您可以检查 this 和 thistead octivities"> this 有一些理解为什么要使用片段的问题。
现代Android开发中也有一个流行的概念,称为“单活动架构”。 Please read
Actually this is more about development benefits rather than performance benefits. Fragments and activities are not just about showing some screens.This is more. You can check this and this questions for some understandings why to use fragments.
There is also a popular concept in modern android development called "Single Activity Architecture". Please read this and this articles for having a good understanding. I think you will get all your answers.