Hey guys I am using Android Studio Giraffe (Canar...
# compose
s
Hey guys I am using Android Studio Giraffe (Canary 11) and while working on some composables, I have observed that the compose preview generates/reloads on almost every keystroke that I feel can be a bit too much as it sort of leads to worse preview performance as it is trying to generate a new preview on every micro change. What I want is to first write the code, and when I’m done making the changes, then I can press some keyboard shortcut like
Cmd + S
or something similar to refresh the preview. That way, it will only have to reload once that might be quicker as well. Is there a way to achieve this?
s
Yes there is exactly such a setting in your IDE. Search for live preview or something like that and it should pop up.
Found it
s
Thank you for the help Stylianos But seems like
Live Edit
only works for Emulators or Physical Devices What I am looking for, is to disable
Live Updates
i.e. to not update the Composable Previews that are shown in the split screen while coding.
c
There’s a setting exposed through the Preview status indicator that enables and disables refreshing the preview as you type
We’re working though on exposing a setting in Settings to more easily control, outside of the tooltip. Refreshing on Save can also be considered but at the moment, you can customize the keyboard shortcut for Build & Refresh if you’d like.
s
Understood Thanks Chris :)