Kawan Osman
Kawan Osman

Reputation: 115

How I can detect drag gestures google map in jetpack compose?

I have toggle button to reset camera to current user location and also trucking user, when user changed location also update camera to this, now I want on user dragged map this tracking listener dismiss. until click the button again.

Upvotes: 2

Views: 1487

Answers (1)

Julius Trognitz
Julius Trognitz

Reputation: 74

you can use cameraPositionState.cameraMoveStartedReason

if (cameraPositionState.cameraMoveStartedReason == GESTURE) {
    // movement by user
}

Upvotes: 5

Related Questions