GoogleMap.OnMyLocationButtonClickListener | Android Developers

Quicknav Quicknav
Links

- Google Play Developer Console
- Android Developers Blog
- About Android

Android Sites

- Android.com
- Android Developers
- Android Open Source Project

Language
close

- - About
  - Wear
  - TV
  - Auto
- - Get Started
  - Devices
  - Style
  - Patterns
  - Building Blocks
  - Downloads
  - Videos
- - Training
  - API Guides
  - Reference
  - Tools
  - Google Services
  - Samples
- - Google Play
  - Essentials
  - Get Users
  - Engage & Retain
  - Monetize
  - Analyze
  - Tools & Reference
  - Developer Stories

## Results

Loading...
public static interface

# GoogleMap.OnMyLocationButtonClickListener

com.google.android.gms.maps.GoogleMap.OnMyLocationButtonClickListener

## Class Overview

Callback interface for when the My Location button is clicked.

## Summary

Public Methods
abstract boolean | onMyLocationButtonClick() Called when the my location button is clicked.

## Public Methods

#### public abstract boolean onMyLocationButtonClick ()

Called when the my location button is clicked.

Use `FusedLocationProviderApi` if you need to obtain the user's current location.

##### Returns

- `true` if the listener has consumed the event (i.e., the default behavior should not occur), `false` otherwise (i.e., the default behavior should occur). The default behavior is for the camera move such that it is centered on the user location.