SupportMapFragment vs MapFragment performance-wise
Asked Answered
S

2

4

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?

Slenderize answered 8/2, 2014 at 14:31 Comment(0)
R
13

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.

Rashid answered 8/2, 2014 at 14:42 Comment(0)
B
0

You should not use MapFragment, since it extends android.app.Fragment.
and android.app.Fragment is deprecated.

Barye answered 2/5, 2020 at 17:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.