Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

like image 682
Jack Avatar asked Dec 18 '18 02:12

Jack


2 Answers

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:

like image 189
Bilal Rabbani Avatar answered Oct 15 '22 22:10

Bilal Rabbani


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.
like image 40
Arthur Avatar answered Oct 15 '22 22:10

Arthur