Class Info |
|---|
public class TextureMapFragment extends Fragment Map component inherited from Fragment, which is the simplest way for placing a map in an app. It provides a view of a map to manage the map lifecycle, and can be loaded to the layout file of Activity for use. To obtain the map manager, call getMapAsync. CAUTION: TextureMapFragment cannot be used together with MapFragment, MapView, and SupportMapFragment. |
Constructor Name |
|---|
TextureMapFragment() Default constructor of the TextureMapFragment class. |
Qualifier and Type | Method Name and Description |
|---|---|
void | getMapAsync(OnMapReadyCallback callback) Obtains a HuaweiMap object when the object is ready. |
static TextureMapFragment | Creates a TextureMapFragment object with default attributes. |
static TextureMapFragment | newInstance(HuaweiMapOptions options) Creates a TextureMapFragment object based on the specified options. |
void | onActivityCreated(Bundle savedInstanceState) Lifecycle method inherited from MapFragment. |
void | onAttach(Activity activity) Lifecycle method inherited from MapFragment. |
void | onCreate(Bundle savedInstanceState) Lifecycle method inherited from MapFragment. |
View | onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) Lifecycle method inherited from MapFragment. |
void | Lifecycle method inherited from MapFragment. |
void | Lifecycle method inherited from MapFragment. |
void | onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) Lifecycle method inherited from MapFragment. This method is called when Fragment is statically loaded in XML mode. |
void | Lifecycle method inherited from MapFragment. This method is called when the memory is insufficient. |
void | onPause() Lifecycle method inherited from MapFragment. |
void | onResume() Lifecycle method inherited from MapFragment. |
void | onSaveInstanceState(Bundle outState) Lifecycle method inherited from MapFragment and called when TextureMapFragment is destroyed unexpectedly. It is used to save the status of a TextureMapFragment object before it is destroyed. |
void | onStart() Lifecycle method inherited from MapFragment. |
void | onStop() Lifecycle method inherited from MapFragment. |
void | setArguments(Bundle args) Lifecycle method inherited from MapFragment and called when data needs to be passed to TextureMapFragment. |
Method |
|---|
public void getMapAsync(OnMapReadyCallback callback) Obtains a HuaweiMap object when the object is ready. |
Parameters
Name | Description |
|---|---|
callback | Callback to be executed when a HuaweiMap object is ready for use. |
Method |
|---|
public static TextureMapFragment newInstance() Creates a TextureMapFragment object with default attributes. |
Returns
Type | Description |
|---|---|
TextureMapFragment | TextureMapFragment object. |
Method |
|---|
public static TextureMapFragment newInstance(HuaweiMapOptions options) Creates a TextureMapFragment object based on the specified options. |
Parameters
Name | Description |
|---|---|
options | Attributes required for creating a HuaweiMapOptions object. |
Returns
Type | Description |
|---|---|
TextureMapFragment | TextureMapFragment object. |
Method |
|---|
public void onActivityCreated(Bundle savedInstanceState) Lifecycle method inherited from MapFragment. |
Parameters
Name | Description |
|---|---|
savedInstanceState | Status to be saved for a TextureMapFragment object. |
Method |
|---|
public void onAttach(Activity activity) Lifecycle method inherited from MapFragment. |
Parameters
Name | Description |
|---|---|
activity | Activity object bound to TextureMapFragment. |
Method |
|---|
public void onCreate(Bundle savedInstanceState) Lifecycle method inherited from MapFragment. |
Parameters
Name | Description |
|---|---|
savedInstanceState | Status to be saved for a TextureMapFragment object. |
Method |
|---|
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) Lifecycle method inherited from MapFragment. |
Parameters
Name | Description |
|---|---|
inflater | LayoutInflater object, which is used to search for controls in a layout. |
container | Layout container. |
savedInstanceState | Status to be saved for a TextureMapFragment object. |
Returns
Type | Description |
|---|---|
View | View object. |
Method |
|---|
public void onInflate(Activity activity, AttributeSet attrs, Bundle savedInstanceState) Lifecycle method inherited from MapFragment. This method is called when Fragment is statically loaded in XML mode. |
Parameters
Name | Description |
|---|---|
activity | Activity object bound to TextureMapFragment. |
attrs | Attributes used to create a TextureMapFragment object. |
savedInstanceState | Status to be saved for a TextureMapFragment object. |
Method |
|---|
public void onLowMemory() Lifecycle method inherited from MapFragment. This method is called when the memory is insufficient. |
Method |
|---|
public void onSaveInstanceState(Bundle outState) Lifecycle method inherited from MapFragment and called when TextureMapFragment is destroyed unexpectedly. It is used to save the status of a TextureMapFragment object before it is destroyed. |
Parameters
Name | Description |
|---|---|
outState | Status to be saved for a TextureMapFragment object. |
Method |
|---|
public void setArguments(Bundle args) Lifecycle method inherited from MapFragment and called when data needs to be passed to TextureMapFragment. |
Parameters
Name | Description |
|---|---|
args | Data to be passed to TextureMapFragment. |