在性能方面,SupportMapFragment与MapFragment [英] SupportMapFragment vs MapFragment performance-wise

查看:213
本文介绍了在性能方面,SupportMapFragment与MapFragment的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SupportMapFragment 之间是否有任何区别?和 MapFragment ? 在参考资料中,它指出,仅当您以Android API级别12和更高版本为目标时,才应使用MapFragment,但是还有其他区别吗?其中一个更快吗?

Are there any differences between SupportMapFragment and MapFragment? In the reference it says that you should only use MapFragment when you target Android API level 12 and higher, but are there any other differences? Is one of them faster?

推荐答案

SupportMapFragment和MapFragment有什么区别吗?

Are there any differences between SupportMapFragment and MapFragment?

一个以"Support"一词开头. :-)

One begins with the word "Support". :-)

除此之外,MapFragmentandroid.app.Fragment继承,而SupportMapFragmentandroid.support.v4.app.Fragment继承.

Beyond that, MapFragment inherits from android.app.Fragment, which SupportMapFragment inherits from android.support.v4.app.Fragment.

在参考文献中说,仅当您将Android API级别设置为12以上时,才应使用MapFragment

In the reference it says that you should only use MapFragment when you target Android API level 12 and higher

更准确地说,将MapFragmentActivity结合使用(使用本机API Level 11+片段),将SupportMapFragmentFragmentActivityActionBarActivity结合使用(使用片段反向端口).

More accurately, you use MapFragment with an Activity (using native API Level 11+ fragments) and you use SupportMapFragment with a FragmentActivity or ActionBarActivity (using the fragment backport).

还有其他区别吗?

are there any other differences?

由于Play Services SDK是封闭源代码,因此可靠地知道这一点的唯一方法是在Google找一份工作,以便您可以检查源代码.

Since the Play Services SDK is closed source, the only way to know that reliably is to get a job at Google so that you can examine the source code.

其中之一更快吗?

Is one of them faster?

它们应该彼此接近.我没有听到任何有关性能差异的报告.

They should be near clones of one another. I have not heard of any reports of performance differences.

这篇关于在性能方面,SupportMapFragment与MapFragment的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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