缩小和缩放以适合屏幕按钮不起作用

缩小和缩放以适合屏幕按钮不起作用

本文介绍了Android Studio 3.3,布局预览,放大,缩小和缩放以适合屏幕按钮不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在布局预览"上打开活动布局时,我想放大,但是当我单击放大"按钮时,什么也没有发生.另外,缩小并缩放以适合屏幕按钮不起作用.

When I open an activity layout on Layout Preview, I want to zoom in but when I click to zoom in button nothing happens. Also, zoom out and zoom to fit screen buttons not working.

  • 已将Android Studio更新到版本3.3.
  • 完成所有Android SDK更新.
  • 更新了NDK.
  • 清理项目.
  • 重建项目.
  • 创建一个新项目.

如何解决此问题?

我想我找到了解决方案.如果您的缩放比例为24%,则放大和缩小按钮不起作用.要修复该错误,请减小布局预览窗口的大小,直到缩放级别变为23%或更低.此后,缩放按钮将再次开始工作.

I think I found the solution. If your zoom level on 24%, zoom in and zoom out buttons not working. To fix the bug, lower layout preview window size till zoom level become 23% and lower. After this, zoom buttons starts to work again.

屏幕截图: https://prnt.sc/mgkphw | https://prnt.sc/mgkpxu

推荐答案

这是Android Studio中的错误;在某些缩放级别(例如24%或9%或其他水平)时,缩放按钮将停止工作.一种解决方法是不断更改预览设备"的类型,并找到可以使用缩放按钮的设备.

It is a bug in Android Studio; at some zoom levels (e.g 24% or 9% or whatever) the zoom buttons stop working. One fix is to keep changing the 'Device for Preview' type and find the one on which zoom buttons work.

但是对我有用的最佳修复是将底部的所有工具(即运行,Logcat,TODO,终端,构建等)最小化.然后,缩放按钮开始起作用.即使再次打开工具,缩放也将继续起作用.

But 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.

只是验证解决方案;重新打开底部工具之一(例如Logcat),然后点击缩放以适合屏幕大小(ctl + 0)",则很有可能缩放按钮将再次停止工作.只需再次最小化工具,即可修复.

Just to verify the solution; re-open one of the bottom tools (e.g Logcat) and click 'Zoom to fit screen (ctl+0)', most likely the zoom buttons will stop working again. Simply minimize the tools again and it's fixed.

这篇关于Android Studio 3.3,布局预览,放大,缩小和缩放以适合屏幕按钮不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-24 12:10