can someone help me find the refresh layout button which was there before studio 2.2 to refresh the layout changes?
Have searched every where but cannot find it.The problem is sometimes drawables are not refreshed and reflected in the preview window.
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.
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)
来源:https://stackoverflow.com/questions/39646639/android-studio-2-2-layout-editor-refresh-button