'Is there a way to set auto refresh the jetpack compose preview?
I just started to use the Jetpack compose toolkit. I added the @Preview
and a set showBackground = true, showSystemUi = true
as parameters and it works really good. But every time i add or change something it doesn't auto refresh by itself, so i have to do it manually.
Solution 1:[1]
as Raul text, padding and some other things update automatically, but **
make sure you have live edit of literals on
**.
But soon Live edit of composables, not just literals (Int, String, Dp...) will be available, : read more here
Solution 2:[2]
Some Components auto-refresh on version 1.1.1
Solution 3:[3]
for the static resources like text, color the UI updates automatically, as it does on the running application, but for the structural components you need to rebuild the project and the changes apply automatically in the preview as well.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | |
Solution 2 | AjibsBaba |
Solution 3 | Raul Lucaciu |