Positioning Google maps v2 zoom in controls in Android

You can accomplish this with the GoogleMap.setPadding() method (added in September 2013):

map.setPadding(leftPadding, topPadding, rightPadding, bottomPadding);

From the API docs:

This method allows you to define a visible region on the map, to signal to the map that portions of the map around the edges may be obscured, by setting padding on each of the four edges of the map. Map functions will be adapted to the padding. For example, the zoom controls, compass, copyright notices and Google logo will be moved to fit inside the defined region, camera movements will be relative to the center of the visible region, etc.

Also see the description of how padding works in GoogleMap.


Unfortunately there is no way to move the zoom controls provided with Google Maps you could disable them and create your own custom zoom controls and place them on the top of the map.


I think this would be helpful for you. I am attempting to implement a similar layout, my solution has been to try and hide the controls on a timed interval like 3 seconds on camera updates.

I think this is the best solution without having to implement custom controls.

mapFragment.setOnCameraChangeListener(new OnCameraChangeListener() {

            @Override
            public void onCameraChange(CameraPosition position) {
                mapFragment.getUiSettings().setZoomControlsEnabled(true);
                Timer t = new Timer();
                TimerTask tt = new TimerTask() {

                    @Override
                    public void run() {
                        getActivity().runOnUiThread(new Runnable() {

                            @Override
                            public void run() {
                                mapFragment.getUiSettings().setZoomControlsEnabled(false);

                            }
                        });

                    }
                };

                t.schedule(tt, 3000);


            }

        });

This was mostly a proof of concept. But it does work.