When I use the method below to perform an animation on a google map, the animation ends if we touch the screen during the animation.
googleMap.animateCamera(
CameraUpdateFactory.newCameraPosition(cameraPosition1),400,
new CancelableCallback() {
@Override
public void onFinish() {
}
@Override
public void onCancel() {
}
});
I tried disabling touch detection using the code below
mapFragment.getView().setEnabled(false);
googleMap.getUiSettings().setAllGesturesEnabled(false);
but the application detects a touch, despite the lines above. How to disable touch?
source
share