public class MapFragment
extends android.app.Fragment
限定符和类型 | 方法和说明 |
---|---|
AMap |
getMap()
获取地图控制器AMap 对象。
|
static MapFragment |
newInstance()
使用默认的选项创建MapFragment。
|
static MapFragment |
newInstance(AMapOptions options)
根据用户传入的AMapOptions创建MapFragment。
|
void |
onDestroy()
用户重载这个方法时必须调用父类的这个方法,释放地图资源。
|
void |
onDestroyView()
用户重载这个方法时必须调用父类的这个方法,销毁view。
|
void |
onInflate(android.app.Activity activity,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState) |
void |
onLowMemory()
用户重载这个方法时必须调用父类的这个方法,低电量模式。
|
void |
onPause()
用户重载这个方法时必须调用父类的这个方法,暂停地图刷新。
|
void |
onResume()
用户重载这个方法时必须调用父类的这个方法,用来启动地图刷新。
|
void |
onSaveInstanceState(android.os.Bundle outState)
用户重载这个方法时必须调用父类的这个方法,保存地图状态。
|
void |
setUserVisibleHint(boolean isVisibleToUser)
设置是否显示,在fragment切换的时候可以使用,或者想隐藏MapFragment的时候可以使用
|
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, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onCreateView, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onInflate, onMultiWindowModeChanged, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onStart, onStop, onTrimMemory, onViewCreated, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenu
public static MapFragment newInstance()
public static MapFragment newInstance(AMapOptions options)
options
- 地图初始化的AMapOptions对象。public AMap getMap()
public void onInflate(android.app.Activity activity, android.util.AttributeSet attrs, android.os.Bundle savedInstanceState)
onInflate
在类中 android.app.Fragment
public void onResume()
onResume
在类中 android.app.Fragment
public void onPause()
onPause
在类中 android.app.Fragment
public void onDestroyView()
onDestroyView
在类中 android.app.Fragment
public void onDestroy()
onDestroy
在类中 android.app.Fragment
public void onLowMemory()
onLowMemory
在接口中 android.content.ComponentCallbacks
onLowMemory
在类中 android.app.Fragment
public void onSaveInstanceState(android.os.Bundle outState)
onSaveInstanceState
在类中 android.app.Fragment
public void setUserVisibleHint(boolean isVisibleToUser)
setUserVisibleHint
在类中 android.app.Fragment
isVisibleToUser
- true:显示; false:不显示;