public class SupportMapFragment
A map component in an app. It can be used to place a map in an app in the simplest way. To automatically initialize the map system and view, call getMapAsync.
None.
| Construction Method |
| SupportMapFragment() |
| Return type | Method name |
| void | getMapAsync(OnMapReadyCallback callback) |
| static SupportMapFragment | newInstance(HuaweiMapOptions options) |
| static SupportMapFragment | newInstance() |
| void | onActivityCreated(Bundle savedInstanceState) |
| void | onAttach(Activity activity) |
| void | onCreate(Bundle savedInstanceState) |
| View | onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) |
| void | onDestroy() |
| void | onDestroyView() |
| final void | onExitAmbient() |
| final void | onEnterAmbient(Bundle ambientDetails) |
| void | onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) |
| void | onLowMemory() |
| void | onPause() |
| void | onResume() |
| void | onSaveInstanceState(Bundle outState) |
| void | onStart() |
| void | onStop() |
| void | setArguments(Bundle args) |
| Method |
| public void getMapAsync(OnMapReadyCallback callback) |
| Sets a callback object, which will be triggered to obtain a HuaweiMap object when it is ready for use. |
Parameters:
| Parameter name | Parameter desc |
| callback | Callback to be triggered when a map is ready for use. |
Return:
None.
| Method |
| public static SupportMapFragment newInstance(HuaweiMapOptions options) |
| Creates a SupportMapFragment object with specified attributes. |
Parameters:
| Parameter name | Parameter desc |
| options | Attributes required for creating a SupportMapFragment object. |
Return:
| Return type | Parameter desc |
| SupportMapFragment | SupportMapFragment object. |
| Method |
| public static SupportMapFragment newInstance() |
| Creates a SupportMapFragment object with default attributes. |
Parameters:
None.
Return:
| Return type | Parameter desc |
| SupportMapFragment | SupportMapFragment object. |
| Method |
| public void onActivityCreated(Bundle savedInstanceState) |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
| Parameter name | Parameter desc |
| savedInstanceState | Status to be saved for a SupportMapFragment object. |
Return:
None.
| Method |
| public void onAttach(Activity activity) |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
| Parameter name | Parameter desc |
| activity | Activity object bound to SupportMapFragment. |
Return:
None.
| Method |
| public void onCreate(Bundle savedInstanceState) |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
| Parameter name | Parameter desc |
| savedInstanceState | Status to be saved for a SupportMapFragment object. |
Return:
None.
| Method |
| public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
| Parameter name | Parameter desc |
| inflater | LayoutInflater object, which is used to search for controls in a layout. |
| container | Layout container. |
| savedInstanceState | Status to be saved for a SupportMapFragment object. |
Return:
| Return type | Parameter desc |
| View | View object. |
| Method |
| public void onDestroy() |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
None.
Return:
None.
| Method |
| public void onDestroyView() |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
None.
Return:
None.
| Method |
| public void onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) |
| Inherited from android.app.Fragment and called when SupportMapFragment is statically loaded in XML mode. |
Parameters:
| Parameter name | Parameter desc |
| activity | Activity object bound to SupportMapFragment. |
| attrs | Attributes used to create a SupportMapFragment object. |
| savedInstanceState | Status to be saved for a SupportMapFragment object. |
Return:
None.
| Method |
| public void onLowMemory() |
| Inherited from android.app.Fragment and called when the memory is insufficient. |
Parameters:
None.
Return:
None.
| Method |
| public void onPause() |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
None.
Return:
None.
| Method |
| public void onResume() |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
None.
Return:
None.
Parameters:
| Parameter name | Parameter desc |
| outState | Status to be saved for a SupportMapFragment object. |
Return:
None.
| Method |
| public void onStart() |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
None.
Return:
None.
| Method |
| public void onStop() |
| Lifecycle method inherited from android.app.Fragment. |
Parameters:
None.
Return:
None.
| Method |
| public void setArguments(Bundle args) |
| Inherited from android.app.Fragment and called when data needs to be passed to Fragment. |
Parameters:
| Parameter name | Parameter desc |
| args | Data to be passed to SupportMapFragment. |
Return:
None.