January 2018
Intermediate to advanced
434 pages
14h 1m
English
In the given steps, we will learn how to work with the AnkoComponent interface:
class MainActivityUI : AnkoComponent<MainActivity> { override fun createView(ui: AnkoContext<MainActivity>) = with(ui) { verticalLayout { padding = dip(20) val name = editText { id = R.id.name hint = "What is your name?" } val message = editText { id = R.id.message hint = "Your message" } button("Send") { id = R.id.btn_send } }}
Read now
Unlock full access