[Solved] In google map using pinch to zoom in and zoom out with the current location as centre of the map

Create TouchableWrapper and use it in MapFragment public class TouchableWrapper extends FrameLayout { private GoogleMap mGoogleMap = null; public TouchableWrapper(Context context) { super(context); } public void setGoogleMap(GoogleMap googleMap) { mGoogleMap = googleMap; } @Override public boolean dispatchTouchEvent(MotionEvent event) { mScaleDetector.onTouchEvent(event); switch (event.getAction() & MotionEvent.ACTION_MASK) { case MotionEvent.ACTION_DOWN: mGoogleMap.getUiSettings().setScrollGesturesEnabled(true); long thisTime = System.currentTimeMillis(); if (thisTime – … Read more