android studio 2.2 layout editor refresh button

送分小仙女□ 提交于 2019-11-28 09:36:25
twiceYuan

I think it is a small bug, but I find a hack solution to resolve the problem.

You can change a resource id to a wrong name. For example, you have a resource named ic_launcher. When you input ic_launcher1, you can find the interface like this:

Next, click the refresh link (sometimes, it says 'clear cache').

I tried changing the orientation, but it does not work when I replace an existing image file.

Max

It's pretty simple to refresh.

Click on the preview screen, make sure that the preview window has the focus, and press R. It should display the progress in the top-right corner while refreshing.

If it doesn't work for any reason, switch to the design tab and press R. It refreshes the layout instantly.

Toggle the Orientation button in Editor, it is refreshing the changes.

Can't seem to find the refresh layout button too, it's as if it is deliberately removed.

However, I found a temporary refresh layout solution: On the screen orientation button, click the dropdown and then change the Night Mode. See this page for reference on where to find the screen orientation button. Hope this helps.

Close edited layout file and reopen.

You can do this with following shortcuts:

  • Ctrl+F4 (close tab)
  • Ctrl+Shift+E (open Recently edited files)
  • Enter (select recent file to open, your layout file should be already highlighted if edited last)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!