How to disable touch detection while Google Map animation is running in android

1'hafs

When I use the method below to execute an animation on google map, the animation ends if we touch the screen while animation is executing.

googleMap.animateCamera(
                        CameraUpdateFactory.newCameraPosition(cameraPosition1),400,
                        new CancelableCallback() {

                              @Override
                              public void onFinish() {
                              }

                              @Override
                              public void onCancel() {
                              }
        });

I have tried disabling the touch detection using the code below

mapFragment.getView().setEnabled(false); 

googleMap.getUiSettings().setAllGesturesEnabled(false);

but the application detects touch despite the above lines. How do you correctly disable touch?

Sharp Edge

Don't use setEnabled(false) for the view instead use setClickable(false)

mapFragment.getView().setClickable(false);

This should work.

EDIT

Apparently this is bug filed here

https://code.google.com/p/gmaps-api-issues/issues/detail?id=5114

as a work around you can deploy a transparent layer which will receive touch events instead of MapFragment .

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Disable a transition while an animation is running

How to disable Button while AsyncTask is running? (Android)

How to display ripple animation on google map in Android?

How to disable google maps touch events through a layout? (android)

Polygon Touch detection Google Map API V2

Animation not working On Google Map Android

How to apply imageView on touch scale animation in android?

How to create an animation that plays on layout touch in Android?

Getting coordinates of location touch on google map in android

Google map with acceleration detection not working in android studio

How to disable multi touch on Android P?

How to disable surface detection in ARCore Android

How to disable Google Map MouseOver

how to disable phone keyboard while app is running?

How to disable(deactivate) button while program is running?

How to handle touch event on google map (MapFragment)?

How to disable CoordinatorLayout for Snackbar and FAB animation in Android

How to add a touch events while running service call?

how to disable touch in Quintus?

Button background color animation disable touch (IOS)

Cannot disable, then reenable touch, after an SKAction animation

How to disable page animation while loading in WP 8.1?

How to disable tabLayout scroll animation while scrolling it programetically?

How to disable animation while animating using mousewheel and slick slider?

How to detect google map animation finish?

How can i disable series animation in highchart tree map?

how to disable two finger scroll in google map

How to disable all user inputs (click, touch) on an android view

How to disable one-touch-zoom in Android WebView?