anko
anko copied to clipboard
Anko Preview Does not Refresh layout immediately
Hi. I edited my AnkoComponent code, but layout not refresh my code.
I hope issue feedback is helpful. Thanks.
As the DSL layout is Kotlin code, the project build is required in order to get the updated preview.
After the code modification, press Ctrl+F9 (or Cmd+F9 on Mac) and the updated preview will be shown after the successful build.
btw 'make project' builds whole set of flavors/build variants. so it is sometimes faster just to build current flavor apk. anyway google promised to fix it in upcoming gradle plugin releases.
Is there any particular reason why the whole project needs to be built to show preview? In plugin code I see there are fake XML gets generated from Anko Code, could we use some button to trigger the conversion of AnkoComponent to XML without compilation?