0
I want to display a Toast if the map view gains focus. What I’ve been able to do so far is:
mapView.setOnFocusChangeListener(new View.OnFocusChangeListener() {
@Override
public void onFocusChange(View v, boolean hasFocus) {
if (hasFocus) {
Toast.makeText(getApplicationContext(), "Tem o foco", Toast.LENGTH_SHORT).show();
}
}
});
But apparently, just scrolling the screen does not give the focus to the component. How to proceed?
What exactly do you want to know?
– ramaral
When scrolling the screen and the user see the mapview, show a Toast
– Marceloawq