Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to refresh preview on Android Studio 2.2?

Now on Android Studio 2.2 on new Preview mode, there are no more refresh button:

enter image description here

  • Image 1: Preview on Android Studio 2.2 (without refresh button)
  • Image 2: Preview on Android Studio 2.1 (with refresh button)

Does anyone know how to display it again? Or with shortcut maybe?

Edit: If I change a drawable by example and that the change does not appear in the layout, the only method that works for me is closed and restart the project. If I close the layout and as I re-opens nothing happens. Same result using the "Synchronized" button.

like image 302
lopez.mikhael Avatar asked Sep 30 '16 07:09

lopez.mikhael


People also ask

How to refresh the layout in Android Studio on mac?

File->Synchronize . Or equivalently, Ctrl + Alt + Y or the little circle with arrows menu button. Update: In the new Android Studio, This feature is available.


2 Answers

Refresh feature is not removed, it is there; It's pretty simple to refresh:

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

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

like image 79
Max Avatar answered Sep 17 '22 00:09

Max


I think it is a small bug. But I find a hack solution to resolve the problem, you can modify the 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 that:

enter image description here

next step, click refresh icon(sometimes it is 'clear cache' label). it is works for me.

I have try to change the orientation, but it not works when I replace a exist image file.

May your problem is same as : http://stackoverflow.com/questions/39646639/android-studio-2-2-layout-editor-refresh-button

like image 28
Jamil Hasnine Tamim Avatar answered Sep 21 '22 00:09

Jamil Hasnine Tamim