Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
да так и есть, они тесно работают с коммандой Flutter, если посмотреть в репозиторий, там даже дарт код есть тыц
relativeLayout {
padding = dip(16)
val w = dip(200)
val loginEditId = 155;
val loginEdit = editText {
id = loginEditId
hint = "Login"
}.layoutParams { centerInParent(); width = w }
button("Sign up") {
textSize = 18f
onClick { doWork(loginEdit.getText().toString()) }
}.layoutParams {
below(loginEditId); sameLeft(loginEditId);
width = w; topMargin = dip(8)
}
}
constraintLayout {
val sessionStart = textView {
id = R.id.session_start
textSize = 18f
textColor = theme.getColor(R.attr.colorAccent)
}
val sessionTitle = textView {
id = R.id.session_title
textSize = 18f
textColor = Color.BLACK
}.lparams(0, wrapContent)
textView {
id = R.id.session_details
textSize = 16f
}.lparams(0, wrapContent)
applyConstraintSet {
// Connect without block
// You may use view id or view itself to define connections
connect(
START of R.id.session_start to START of PARENT_ID margin dip(10),
TOP of sessionStart to TOP of PARENT_ID margin dip(10)
)
// constraint configuration on view
sessionTitle {
connect(
START to START of PARENT_ID margin dip(SESSION_LIST_HEADER_MARGIN),
TOP to TOP of PARENT_ID margin dip(10),
END to END of PARENT_ID margin dip(10),
BOTTOM to TOP of R.id.session_details
)
horizontalBias = 0.0f
defaultWidth = MATCH_CONSTRAINT_WRAP
}
// constraint configuration on view Id
R.id.session_details {
connect(
START to START of PARENT_ID margin dip(SESSION_LIST_HEADER_MARGIN),
TOP to BOTTOM of sessionTitle margin dip(2),
END to END of PARENT_ID margin dip(10),
BOTTOM to BOTTOM of PARENT_ID margin dip(2)
)
horizontalBias = 0.0f
defaultWidth = MATCH_CONSTRAINT_WRAP
}
}
}
Гонка вооружений