public class MapFragment
extends android.app.Fragment
MapView
的Fragment, 由于 API Level要求在 12 以上的应用中。
如果你的应用要求在 API Level 12以下,用 SupportMapFragment
代替。
Constructor and Description |
---|
MapFragment() |
Modifier and Type | Method and Description |
---|---|
TencentMap |
getMap()
获取当前Fragment的
MapView 关联的 TencentMap 对象 |
static MapFragment |
newInstance(android.content.Context context)
创建一个新的MapFragment
|
void |
onAttach(android.app.Activity activity) |
void |
onCreate(android.os.Bundle bundle) |
android.view.View |
onCreateView(android.view.LayoutInflater layoutinflater,
android.view.ViewGroup viewgroup,
android.os.Bundle bundle) |
void |
onDestroy() |
void |
onDestroyView() |
void |
onInflate(android.app.Activity activity,
android.util.AttributeSet attributeset,
android.os.Bundle bundle) |
void |
onLowMemory() |
void |
onPause() |
void |
onResume() |
void |
onSaveInstanceState(android.os.Bundle bundle) |
void |
onStart() |
void |
onStop() |
void |
setArguments(android.os.Bundle bundle) |
void |
setOnTop(boolean isOnTop) |
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, hashCode, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onMultiWindowModeChanged, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onTrimMemory, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
public static MapFragment newInstance(android.content.Context context)
context
- 要创建的Context, 参见 Android Contextpublic final TencentMap getMap()
MapView
关联的 TencentMap
对象public void onAttach(android.app.Activity activity)
onAttach
in class android.app.Fragment
public void onInflate(android.app.Activity activity, android.util.AttributeSet attributeset, android.os.Bundle bundle)
onInflate
in class android.app.Fragment
public void onCreate(android.os.Bundle bundle)
onCreate
in class android.app.Fragment
public android.view.View onCreateView(android.view.LayoutInflater layoutinflater, android.view.ViewGroup viewgroup, android.os.Bundle bundle)
onCreateView
in class android.app.Fragment
public void onResume()
onResume
in class android.app.Fragment
public void onPause()
onPause
in class android.app.Fragment
public void onDestroyView()
onDestroyView
in class android.app.Fragment
public void onDestroy()
onDestroy
in class android.app.Fragment
public void onStart()
onStart
in class android.app.Fragment
public void onStop()
onStop
in class android.app.Fragment
public void onLowMemory()
onLowMemory
in interface android.content.ComponentCallbacks
onLowMemory
in class android.app.Fragment
public void onSaveInstanceState(android.os.Bundle bundle)
onSaveInstanceState
in class android.app.Fragment
public void setArguments(android.os.Bundle bundle)
setArguments
in class android.app.Fragment
public void setOnTop(boolean isOnTop)