Android Studio Can't Zoom in/out in Layout Editor

17.1k Views Asked by At

It used to work from time to time, but now the ability to zoom in/out on the layout design page is completely gone for me. The layout view always stays at 10% zoomed in and doesn't change no matter what I do. Oddly, the preview tab with exactly the same content zooms just fine.

This problem happens across all my projects and layout files, I tried restarting both the app and my computer numerous times, changing the theme from Dracula to IntelliJ and then back, and of course, tried the "invalidate cache and restart" option, but none of them worked. Am I doing something wrong?

I'm using Android Studio 3.2.1 Build #AI-181.5540.7.32.5056338, built on October 8, 2018

Just for reference, here's a screenshot of the design editor page, which stays like that all the time.

XML Editor Design Tab Screenshot

8

There are 8 best solutions below

2
On BEST ANSWER

It happens from time to time in Android Studio 3. This are steps to try to resolve this issue:

  • invalidate cache and restart studio;
  • choose different emulator from drop-down menu;
  • refresh layout by clicking on eye icon at the top of layout designer view.
0
On

click on logcat and then again minimize it then the zoom will start working again!!

0
On

I am having the same problem on Androd Studio 3.3.1. The solution is a bit silly. Every time the zoom stops working I drag the bottom area (where you have the logcat/build/run) all the way to the top, so it hides your xml. Then drag it back down.

The zoom will start working again.

2
On

The best fix that worked for me was to minimize all the tools on the bottom, i.e Run, Logcat, TODO, Terminal, Build and more ... Then the zoom buttons start working. Even you open the tools back again, the zoom will keep working.

My complete answer is here:

0
On

Try changing the device from pixel 2 to something else! Changing the device worked for me. Try clicking on the zoom (+) button after changing the device!

0
On

Sometimes zooming is freezed when logcat is displayed, so turning logcat on/off often unfreezes zooming.

0
On

I changed the theme from IntelliJ to Darcula and it worked for me. For some people it has worked the other way round.

0
On
  • Click on the Design Surface button (or press B inside a xml design editor)
  • Select some different design or Force Refresh Layout (or press R).

Demo