活动或片段,这是更好的方式来使用的性能和可靠的?这是、片段、可靠、性能

2023-09-07 23:04:33 作者:沉梦听雨

我是新来的Andr​​oid和我已经开发一个Android应用程序,现在正在启动。它是种具有特定日期/时间saveable用户输入的信息。而审查的previous存储的数据的用户。并且还存储了一些设置信息。

I'm new to android and i have developing an android app that is starting now. It is kinds of saveable user input information with specific Date/Time. And reviewable previous stored data to user. And also store some setting information.

这可能看起来很简单,但它将会耗费非常多的UI组件。笔者近日了解到活动和片段和preferred使用一个主要活动类和休息都将建立与片段。

This may be look simple but it will cost a lot of UI components. I recently learned Activity and Fragment and preferred to use one Main Activity class and the rests are will build with Fragments.

我的理解是,片段是企业与活动的生命周期,并打算作为可重复使用的其他活动使用。

My understanding is, Fragment is corporate with Activity Life cycle and intend to use as reusable for other Activities.

不过,我想知道的是,我在问题中提到,

But the thing that i want to know is as i mentioned in question,

是使用每用户界面查看活动的性价比? 如果有碎片的UI视图使用,它可能会更良好的性能,但是可靠性(如:人工维护的数据状态,而与活动和片段互相轮换,但如果使用的活动会更加少的自定义维护)更确保使用片段?

我想我的问题,一些建议。

I want some advice of my question.

推荐答案

检查:

活动与片段,

活动与片段和

Activities VS片段

希望这有助于。

 
精彩推荐