com.tencent.tencentmap.mapsdk.maps

## 类 MapFragment

- java.lang.Object
- - android.app.Fragment
  - - com.tencent.tencentmap.mapsdk.maps.MapFragment

- 所有已实现的接口:
    android.content.ComponentCallbacks, android.content.ComponentCallbacks2, android.view.View.OnCreateContextMenuListener

      public class MapFragment
      extends android.app.Fragment

  含有 `MapView` 的Fragment, 由于 API Level要求在 12 以上的应用中。

  如果你的应用要求在 API Level 12以下，用 `SupportMapFragment` 代替。

  关于Fragment,参见 Android Fragment

- - ### 嵌套类概要

    - ### 从类继承的嵌套类/接口 android.app.Fragment

      `android.app.Fragment.InstantiationException, android.app.Fragment.SavedState`

  - ### 字段概要

    字段
    限定符和类型 | 字段和说明
    --- | ---
    `protected MapView` | `mapV`

    - ### 从接口继承的字段 android.content.ComponentCallbacks2

      `TRIM_MEMORY_BACKGROUND, TRIM_MEMORY_COMPLETE, TRIM_MEMORY_MODERATE, TRIM_MEMORY_RUNNING_CRITICAL, TRIM_MEMORY_RUNNING_LOW, TRIM_MEMORY_RUNNING_MODERATE, TRIM_MEMORY_UI_HIDDEN`

  - ### 构造器概要

    构造器
    构造器和说明
    `MapFragment()`

  - ### 方法概要

    所有方法 静态方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `TencentMap` | `getMap()` 获取当前Fragment的 `MapView` 关联的 `TencentMap`对象
    `protected void` | `initMap(android.content.Context context)`
    `static MapFragment` | `newInstance(android.content.Context context)` 创建一个新的MapFragment
    `void` | `onAttach(android.app.Activity activity)`
    `void` | `onCreate(android.os.Bundle bundle)`
    `protected MapView` | `onCreateMapView(android.content.Context context, TencentMapOptions options)`
    `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)`

    - ### 从类继承的方法 android.app.Fragment

      `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`

    - ### 从类继承的方法 java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### 字段详细资料

    - #### mapV

          protected MapView mapV

  - ### 构造器详细资料

    - #### MapFragment

          public MapFragment()

  - ### 方法详细资料

    - #### newInstance

          public static MapFragment newInstance(android.content.Context context)

      创建一个新的MapFragment
      参数:
        `context` - 要创建的Context， 参见 Android Context
      返回:

    - #### initMap

          protected void initMap(android.content.Context context)

    - #### getMap

          public TencentMap getMap()

      获取当前Fragment的 `MapView` 关联的 `TencentMap`对象
      返回:

    - #### onAttach

          public void onAttach(android.app.Activity activity)

      覆盖:
        `onAttach` 在类中 `android.app.Fragment`

    - #### onInflate

          public void onInflate(android.app.Activity activity,
                                android.util.AttributeSet attributeset,
                                android.os.Bundle bundle)

      覆盖:
        `onInflate` 在类中 `android.app.Fragment`

    - #### onCreate

          public void onCreate(android.os.Bundle bundle)

      覆盖:
        `onCreate` 在类中 `android.app.Fragment`

    - #### onCreateView

          public android.view.View onCreateView(android.view.LayoutInflater layoutinflater,
                                                android.view.ViewGroup viewgroup,
                                                android.os.Bundle bundle)

      覆盖:
        `onCreateView` 在类中 `android.app.Fragment`

    - #### onCreateMapView

          protected MapView onCreateMapView(android.content.Context context,
                                            TencentMapOptions options)

    - #### onResume

          public void onResume()

      覆盖:
        `onResume` 在类中 `android.app.Fragment`

    - #### onPause

          public void onPause()

      覆盖:
        `onPause` 在类中 `android.app.Fragment`

    - #### onDestroyView

          public void onDestroyView()

      覆盖:
        `onDestroyView` 在类中 `android.app.Fragment`

    - #### onDestroy

          public void onDestroy()

      覆盖:
        `onDestroy` 在类中 `android.app.Fragment`

    - #### onStart

          public void onStart()

      覆盖:
        `onStart` 在类中 `android.app.Fragment`

    - #### onStop

          public void onStop()

      覆盖:
        `onStop` 在类中 `android.app.Fragment`

    - #### onLowMemory

          public void onLowMemory()

      指定者:
        `onLowMemory` 在接口中 `android.content.ComponentCallbacks`
      覆盖:
        `onLowMemory` 在类中 `android.app.Fragment`

    - #### onSaveInstanceState

          public void onSaveInstanceState(android.os.Bundle bundle)

      覆盖:
        `onSaveInstanceState` 在类中 `android.app.Fragment`

    - #### setArguments

          public void setArguments(android.os.Bundle bundle)

      覆盖:
        `setArguments` 在类中 `android.app.Fragment`

    - #### setOnTop

          public void setOnTop(boolean isOnTop)