3

I use Compose with AS Arctic Fox v2020.3.1. When I update the code, the preview does not render in real-time. AS show the message "The preview is out of date" and I must click "Build & Refresh". I'd like it to render UI in real-time, similar to XML Design.

How do it?

Thanks in advance.

enter image description here

PhongBM
  • 799
  • 10
  • 23
  • 1
    The tooling in Jetpack compose hasn't reached the speed at which the XML renders in the design yet. If you want close to real-time preview, you may want to try compose for desktop. You can create all your UIs there and just copy-paste them into your android code. – Rafsanjani Aug 02 '21 at 14:52
  • 1
    @Rafsanjani compose for desktop? Are you referring to the UI framework created by JetBrains on top of the original compose? i.e https://www.jetbrains.com/lp/compose/ this one? Just curious how does it make the development faster? I don't think it have a tooling feature and doesn't even have Preview annotation AFAIK what I am missing ? – AgentP Aug 02 '21 at 14:58

1 Answers1

1

AFAIK you can't. You're able to edit string values and certain others, such as padding dp's but when adding or removing elements, you have to rebuild to view the updated layout.