Since this question was posted, Google has updated the API. They have added an onMyLocationButtonClick()
listener.
To add the listener:
//add location button click listener
map.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationButtonClickListener(){
@Override
public boolean onMyLocationButtonClick()
{
//TODO: Any custom actions
return false;
}
});
Returning false will essentially call the super method. Returning true will not.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…