When viewing this video, I saw an interesting thing that the UI is not created in XML, but in the code. Googling, I realized that this is done using the Anko library and decided to try to do something. Result:
class UI(launch: Activity) { init { launch.setContentView( launch.UI { verticalLayout { var cc = 0 button("Click $cc") { onClick { text = "Click ${++cc}" } }.lparams{ width = dip(200) height = dip(75) } } }.view) } } Looking at my creation, I thought that it was possible to somehow improve the code, but I don’t understand how to do it now, so I ask the experts on this issue.