SupportMapFragment vs MapFragment performance-wise

橙三吉。 提交于 2019-12-22 08:06:28

问题


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?


回答1:


Are there any differences between SupportMapFragment and MapFragment?

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

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

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

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?

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.



来源:https://stackoverflow.com/questions/21647248/supportmapfragment-vs-mapfragment-performance-wise

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!