anko icon indicating copy to clipboard operation
anko copied to clipboard

Anko Preview Does not Refresh layout immediately

Open HarryTylenol opened this issue 8 years ago • 3 comments

Hi. I edited my AnkoComponent code, but layout not refresh my code.

I hope issue feedback is helpful. Thanks.

HarryTylenol avatar May 13 '17 20:05 HarryTylenol

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.

yanex avatar May 14 '17 23:05 yanex

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.

mykola-dev avatar May 15 '17 07:05 mykola-dev

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?

stepango avatar Sep 29 '18 03:09 stepango