Android Google Maps: disable dragging in MapFragment

前端 未结 6 881
死守一世寂寞
死守一世寂寞 2020-12-29 17:52

Can I disable drag functionality when the user tries to drag the map with his fingers without disturbing the Zoom in and Zoom out?

Any one please suggest an idea

6条回答
  •  余生分开走
    2020-12-29 18:27

    You don't have to set this in code. You can configure the gestures from XML:

    
    

    As well as uiScrollGestures, you can set uiZoomGestures, uiTiltGestures, and uiRotateGestures.

    See XML Attributes documentation.

提交回复
热议问题