Google Maps Android API: SupportMapFragment vs MapFragment

心已入冬 提交于 2019-11-29 02:21:39

问题


I read through the google maps API documentation and under MapFragment, it advises to use the class only when targeting API 12 and above. Then I assume that SupportMapFragment targets API 11 and below, though google didn't explicit mention it in the documentation. Then what if I want to target a wide range of API lvl? Does SupportMapFragment also targets API above 11?


回答1:


Then I assume that SupportMapFragment targets API 11 and below, though google didn't explicit mention it in the documentation.

SupportMapFragment is for use with the Android Support package's backport of fragments. It can be used on Android devices running API 10 and lower, as well as Android devices running 11 and higher. MapFragment requires the native API Level 11 fragment implementation, and therefore can only be used on API Level 11 and higher devices.

Note that there are no devices running API Level 11 that I know of -- everything has been upgraded at least to API Level 12.



来源:https://stackoverflow.com/questions/15403961/google-maps-android-api-supportmapfragment-vs-mapfragment

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