OnMapReadyCallbackpublic class SupportMapFragment extends androidx.fragment.app.Fragment implements OnMapReadyCallback
A Map component in an app. This fragment is the simplest way to place a map in an application. It's a wrapper around a view of a map to automatically handle the necessary life cycle needs. Being a fragment, this component can be added to an activity's layout or can dynamically be added using a FragmentManager.
To get a reference to the MapView, use getMapAsync(OnMapReadyCallback)}
getMapAsync(OnMapReadyCallback)| Constructor | Description |
|---|---|
SupportMapFragment() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
getMapAsync(OnMapReadyCallback onMapReadyCallback) |
Sets a callback object which will be triggered when the TrimbleMapsMap instance is ready to be used.
|
static SupportMapFragment |
newInstance() |
Creates a default MapFragment instance
|
static SupportMapFragment |
newInstance(TrimbleMapsMapOptions trimbleMapsMapOptions) |
Creates a MapFragment instance
|
void |
onAttach(android.content.Context context) |
Called when the context attaches to this fragment.
|
android.view.View |
onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState) |
Creates the fragment view hierarchy.
|
void |
onDestroy() |
Called when the fragment is destroyed.
|
void |
onDestroyView() |
Called when the fragment is view hierarchy is being destroyed.
|
void |
onInflate(android.content.Context context,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState) |
Called when this fragment is inflated, parses XML tag attributes.
|
void |
onLowMemory() |
Called when the fragment receives onLowMemory call from the hosting Activity.
|
void |
onMapReady(TrimbleMapsMap trimbleMapsMap) |
Called when the map is ready to be used.
|
void |
onPause() |
Called when the fragment is pausing.
|
void |
onResume() |
Called when the fragment is ready to be interacted with.
|
void |
onSaveInstanceState(android.os.Bundle outState) |
Called when the fragment state needs to be saved.
|
void |
onStart() |
Called when the fragment is visible for the users.
|
void |
onStop() |
Called when the fragment is no longer visible for the user.
|
void |
onViewCreated(android.view.View view,
android.os.Bundle savedInstanceState) |
Called when the fragment view hierarchy is created.
|
dump, equals, getActivity, getAllowEnterTransitionOverlap, getAllowReturnTransitionOverlap, getArguments, getChildFragmentManager, getContext, getEnterTransition, getExitTransition, getFragmentManager, getHost, getId, getLayoutInflater, getLayoutInflater, getLifecycle, getLoaderManager, getParentFragment, getReenterTransition, getResources, getRetainInstance, getReturnTransition, getSharedElementEnterTransition, getSharedElementReturnTransition, getString, getString, getTag, getTargetFragment, getTargetRequestCode, getText, getUserVisibleHint, getView, getViewLifecycleOwner, getViewLifecycleOwnerLiveData, getViewModelStore, hashCode, hasOptionsMenu, instantiate, instantiate, isAdded, isDetached, isHidden, isInLayout, isMenuVisible, isRemoving, isResumed, isStateSaved, isVisible, onActivityCreated, onActivityResult, onAttach, onAttachFragment, onConfigurationChanged, onContextItemSelected, onCreate, onCreateAnimation, onCreateAnimator, onCreateContextMenu, onCreateOptionsMenu, onDestroyOptionsMenu, onDetach, onGetLayoutInflater, onHiddenChanged, onInflate, onMultiWindowModeChanged, onOptionsItemSelected, onOptionsMenuClosed, onPictureInPictureModeChanged, onPrepareOptionsMenu, onRequestPermissionsResult, onViewStateRestored, postponeEnterTransition, registerForContextMenu, requestPermissions, requireActivity, requireContext, requireFragmentManager, requireHost, setAllowEnterTransitionOverlap, setAllowReturnTransitionOverlap, setArguments, setEnterSharedElementCallback, setEnterTransition, setExitSharedElementCallback, setExitTransition, setHasOptionsMenu, setInitialSavedState, setMenuVisibility, setReenterTransition, setRetainInstance, setReturnTransition, setSharedElementEnterTransition, setSharedElementReturnTransition, setTargetFragment, setUserVisibleHint, shouldShowRequestPermissionRationale, startActivity, startActivity, startActivityForResult, startActivityForResult, startIntentSenderForResult, startPostponedEnterTransition, toString, unregisterForContextMenupublic static SupportMapFragment newInstance()
@NonNull public static SupportMapFragment newInstance(@Nullable TrimbleMapsMapOptions trimbleMapsMapOptions)
trimbleMapsMapOptions - The configuration options to be used.public void onAttach(android.content.Context context)
onAttach in class androidx.fragment.app.Fragmentcontext - the context attachingpublic void onInflate(@NonNull
android.content.Context context,
android.util.AttributeSet attrs,
android.os.Bundle savedInstanceState)
onInflate in class androidx.fragment.app.Fragmentcontext - The context inflating this fragment.attrs - The XML tag attributes.savedInstanceState - The saved instance state for the map fragment.public android.view.View onCreateView(android.view.LayoutInflater inflater,
android.view.ViewGroup container,
android.os.Bundle savedInstanceState)
onCreateView in class androidx.fragment.app.Fragmentinflater - Inflater used to inflate content.container - The parent layout for the map fragment.savedInstanceState - The saved instance state for the map fragment.public void onViewCreated(android.view.View view,
android.os.Bundle savedInstanceState)
onViewCreated in class androidx.fragment.app.Fragmentview - The content view of the fragmentsavedInstanceState - THe saved instance state of the framgntpublic void onMapReady(@NonNull
TrimbleMapsMap trimbleMapsMap)
OnMapReadyCallbackonMapReady in interface OnMapReadyCallbacktrimbleMapsMap - An instance of TrimbleMapsMap associated with the MapFragment or
MapView that defines the callback.public void onStart()
onStart in class androidx.fragment.app.Fragmentpublic void onResume()
onResume in class androidx.fragment.app.Fragmentpublic void onPause()
onPause in class androidx.fragment.app.Fragmentpublic void onSaveInstanceState(@NonNull
android.os.Bundle outState)
onSaveInstanceState in class androidx.fragment.app.FragmentoutState - The saved statepublic void onStop()
onStop in class androidx.fragment.app.Fragmentpublic void onLowMemory()
onLowMemory in class androidx.fragment.app.Fragmentpublic void onDestroyView()
onDestroyView in class androidx.fragment.app.Fragmentpublic void onDestroy()
onDestroy in class androidx.fragment.app.Fragmentpublic void getMapAsync(@NonNull
OnMapReadyCallback onMapReadyCallback)
onMapReadyCallback - The callback to be invoked.