它是建议建立使用碎片所有的应用程序? [英] Is it advised to build all apps using fragments?

查看:87
本文介绍了它是建议建立使用碎片所有的应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在现代的Andr​​oid开发,它是建议完全走上片状的发展?

In the modern Android development, is it advised to completely move onto fragment-like development?

要建立使用片段手机和平板电脑的应用程序,而不是做的活动,只和活动+片段的应用程序?

To build both mobile phones and tablets apps using fragments and not do differentiate between activity-solely and activity+fragment apps?

有没有谷歌Android团队的官方建议完全转移到记忆碎片或不完全动?

Are there any Google Android Team's official recommendation to completely move to "fragments" or not to completely move?

推荐答案

您不必使用片段来开发,但如果你想为消费者提供最大数量/提供最好的环境,设备,那么你应该切换到片段。但是,如果你真的认为片段是魔鬼的工作,你可以坚持只基于活动的发展提供一个邋遢寻找UI。

You don't have to develop using fragments but if you want to provide the maximum number of consumers/devices with the best possible environment then you should switch to fragments. However if you really think fragments are the devils work you can stick to just Activity-based development and provide a sloppy looking UI.

至于谷歌的感​​受走,我觉得这个概括起来 -

As far as Googles' feelings go, I think this sums it up-

嵌入式通过的ActivityGroup活动是一个很好的想法,但一直很难对付,因为活动被设计成一个独立的自包含的组件,而不是与其他活动密切互动。该片段API是用于这一个更好的解决方案,并应被视为作为替换为嵌入式活动

Embedded Activities via ActivityGroup were a nice idea, but have always been difficult to deal with since Activity is designed to be an independent self-contained component instead of closely interacting with other activities. The Fragment API is a much better solution for this, and should be considered as a replacement for embedded activities.

有关片段使用的详细信息检查出来这里和更多的设计理念退房这个帖子

For more info about fragment usage check it out here and for more of the design philosophy check out this post.

这篇关于它是建议建立使用碎片所有的应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆