A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developers.google.com/android/reference/com/google/android/gms/maps/SupportMapFragment below:

SupportMapFragment | Google Play services

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 file simply with the XML below.

 <fragment
    class="com.google.android.gms.maps.SupportMapFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"/>

A

GoogleMap

must be acquired using

getMapAsync(OnMapReadyCallback)

. This class automatically initializes the maps system and the view.

A view can be removed when the SupportMapFragment's onDestroyView() method is called and the GoogleMapOptions.useViewLifecycleInFragment(boolean) option is set. When this happens the SupportMapFragment is no longer valid until the view is recreated again later when the SupportMapFragment's onCreateView(LayoutInflater, ViewGroup, Bundle) method is called.

Any objects obtained from the GoogleMap are associated with the view. It's important to not hold on to objects (e.g. Marker) beyond the view's life. Otherwise it will cause a memory leak as the view cannot be released.

To use this class, you must include the Android support library in your build path.

Developer Guide

For more information, read the Google Maps SDK for Android developer guide.

Inherited Field Summary From class androidx.fragment.app.Fragment Public Constructor Summary Public Method Summary Inherited Method Summary From class androidx.fragment.app.Fragment void final boolean final FragmentActivity

getActivity()

boolean

getAllowEnterTransitionOverlap()

boolean

getAllowReturnTransitionOverlap()

final Bundle

getArguments()

final FragmentManager

getChildFragmentManager()

Context

getContext()

CreationExtras

getDefaultViewModelCreationExtras()

ViewModelProvider.Factory

getDefaultViewModelProviderFactory()

Object

getEnterTransition()

Object

getExitTransition()

final FragmentManager

getFragmentManager()

final Object

getHost()

final int

getId()

LayoutInflater getLayoutInflater

(

Bundle

arg0)

final LayoutInflater

getLayoutInflater()

Lifecycle

getLifecycle()

LoaderManager

getLoaderManager()

final Fragment

getParentFragment()

final FragmentManager

getParentFragmentManager()

Object

getReenterTransition()

final Resources

getResources()

final boolean

getRetainInstance()

Object

getReturnTransition()

final SavedStateRegistry

getSavedStateRegistry()

Object

getSharedElementEnterTransition()

Object

getSharedElementReturnTransition()

final String final String

getString(int arg0)

final String

getTag()

final Fragment

getTargetFragment()

final int

getTargetRequestCode()

final CharSequence

getText(int arg0)

boolean

getUserVisibleHint()

View

getView()

LifecycleOwner

getViewLifecycleOwner()

LiveData<LifecycleOwner>

getViewLifecycleOwnerLiveData()

ViewModelStore

getViewModelStore()

final boolean

hasOptionsMenu()

final int

hashCode()

static Fragment static Fragment final boolean

isAdded()

final boolean

isDetached()

final boolean

isHidden()

final boolean

isInLayout()

final boolean

isMenuVisible()

final boolean

isRemoving()

final boolean

isResumed()

final boolean

isStateSaved()

final boolean

isVisible()

void onActivityCreated

(

Bundle

arg0)

void onActivityResult

(int arg0, int arg1,

Intent

arg2)

void void void void boolean void Animation

onCreateAnimation(int arg0, boolean arg1, int arg2)

Animator

onCreateAnimator(int arg0, boolean arg1, int arg2)

void void View void

onDestroy()

void

onDestroyOptionsMenu()

void

onDestroyView()

void

onDetach()

LayoutInflater onGetLayoutInflater

(

Bundle

arg0)

void

onHiddenChanged(boolean arg0)

void void void

onLowMemory()

void

onMultiWindowModeChanged(boolean arg0)

boolean void onOptionsMenuClosed

(

Menu

arg0)

void

onPause()

void

onPictureInPictureModeChanged(boolean arg0)

void onPrepareOptionsMenu

(

Menu

arg0)

void

onPrimaryNavigationFragmentChanged(boolean arg0)

void onRequestPermissionsResult

(int arg0,

String[]

arg1, int[] arg2)

void

onResume()

void onSaveInstanceState

(

Bundle

arg0)

void

onStart()

void

onStop()

void void onViewStateRestored

(

Bundle

arg0)

void

postponeEnterTransition()

final void postponeEnterTransition

(long arg0,

TimeUnit

arg1)

final <I, O> ActivityResultLauncher<I>

registerForActivityResult(ActivityResultContract<I, O> arg0, ActivityResultCallback<O> arg1)

final <I, O> ActivityResultLauncher<I>

registerForActivityResult(ActivityResultContract<I, O> arg0, ActivityResultRegistry arg1, ActivityResultCallback<O> arg2)

void registerForContextMenu

(

View

arg0)

final void requestPermissions

(

String[]

arg0, int arg1)

final FragmentActivity

requireActivity()

final Bundle

requireArguments()

final Context

requireContext()

final FragmentManager

requireFragmentManager()

final Object

requireHost()

final Fragment

requireParentFragment()

final View

requireView()

void

setAllowEnterTransitionOverlap(boolean arg0)

void

setAllowReturnTransitionOverlap(boolean arg0)

void void

setEnterSharedElementCallback(SharedElementCallback arg0)

void setEnterTransition

(

Object

arg0)

void

setExitSharedElementCallback(SharedElementCallback arg0)

void setExitTransition

(

Object

arg0)

void

setHasOptionsMenu(boolean arg0)

void void

setMenuVisibility(boolean arg0)

void setReenterTransition

(

Object

arg0)

void

setRetainInstance(boolean arg0)

void setReturnTransition

(

Object

arg0)

void setSharedElementEnterTransition

(

Object

arg0)

void setSharedElementReturnTransition

(

Object

arg0)

void setTargetFragment

(

Fragment

arg0, int arg1)

void

setUserVisibleHint(boolean arg0)

boolean shouldShowRequestPermissionRationale

(

String

arg0)

void void void startActivityForResult

(

Intent

arg0, int arg1)

void startActivityForResult

(

Intent

arg0, int arg1,

Bundle

arg2)

void void

startPostponedEnterTransition()

String

toString()

void unregisterForContextMenu

(

View

arg0)

From class java.lang.Object Object

clone()

boolean void

finalize()

final Class<?>

getClass()

int

hashCode()

final void

notify()

final void

notifyAll()

String

toString()

final void

wait(long arg0, int arg1)

final void

wait(long arg0)

final void

wait()

From interface android.content.ComponentCallbacks abstract void abstract void

onLowMemory()

From interface android.view.View.OnCreateContextMenuListener From interface androidx.lifecycle.LifecycleOwner abstract Lifecycle

getLifecycle()

From interface androidx.lifecycle.ViewModelStoreOwner abstract ViewModelStore

getViewModelStore()

From interface androidx.lifecycle.HasDefaultViewModelProviderFactory CreationExtras

getDefaultViewModelCreationExtras()

abstract ViewModelProvider.Factory

getDefaultViewModelProviderFactory()

From interface androidx.savedstate.SavedStateRegistryOwner abstract SavedStateRegistry

getSavedStateRegistry()

From interface androidx.activity.result.ActivityResultCaller abstract <I, O> ActivityResultLauncher<I>

registerForActivityResult(ActivityResultContract<I, O> arg0, ActivityResultCallback<O> arg1)

abstract <I, O> ActivityResultLauncher<I>

registerForActivityResult(ActivityResultContract<I, O> arg0, ActivityResultRegistry arg1, ActivityResultCallback<O> arg2)

Public Constructors public SupportMapFragment ()

Creates a map fragment. This constructor is public only for use by an inflater. Use newInstance() to create a SupportMapFragment programmatically.

Public Methods public void getMapAsync (OnMapReadyCallback callback)

Sets a callback object which will be triggered when the GoogleMap instance is ready to be used.

Note that:

Parameters callback The callback object that will be triggered when the map is ready to be used. Must not be null. public static SupportMapFragment newInstance (GoogleMapOptions options)

Creates a map fragment with the given options.

Parameters options configuration GoogleMapOptions for a GoogleMap, or null to use the default options. public static SupportMapFragment newInstance ()

Creates a map fragment, using default options.

public void onActivityCreated (Bundle savedInstanceState) public void onAttach (Activity activity) public void onCreate (Bundle savedInstanceState) public void onDestroyView () public final void onEnterAmbient (Bundle ambientDetails)

You must call this method from the parent WearableActivity's corresponding method.

public final void onExitAmbient ()

You must call this method from the parent WearableActivity's corresponding method.

public void onInflate (Activity activity, AttributeSet attrs, Bundle savedInstanceState)

Parse attributes during inflation from a view hierarchy into the arguments we handle.

public void onLowMemory () public void onSaveInstanceState (Bundle outState)

Provides a Bundle to store the state of the Fragment before it gets destroyed. It can later be retrieved when onCreate(Bundle) is called again.

public void setArguments (Bundle args)

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4