简体   繁体   English

有没有办法设置自动刷新jetpack compose预览?

[英]Is there a way to set auto refresh the jetpack compose preview?

I just started to use the Jetpack compose toolkit.我刚开始使用 Jetpack compose 工具包。 I added the @Preview and a set showBackground = true, showSystemUi = true as parameters and it works really good.我添加了@Preview和一组showBackground = true, showSystemUi = true作为参数,它工作得非常好。 But every time i add or change something it doesn't auto refresh by itself, so i have to do it manually.但是每次我添加或更改某些内容时,它不会自动刷新,所以我必须手动进行。

as Raul text, padding and some other things update automatically, but **因为 Raul 文本、填充和其他一些东西会自动更新,但是 **

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但很快将提供可组合的实时编辑,而不仅仅是文字(Int,String,Dp ...),:在这里阅读更多

一些组件在 1.1.1 版本上自动刷新

对于文本等静态资源,UI 会自动更新颜色,就像在运行的应用程序上一样,但对于结构组件,您需要重新构建项目,并且更改也会自动应用到预览中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM