Skip to content

Instantly share code, notes, and snippets.

@baeyeongpyo
Last active August 4, 2018 07:26
Show Gist options
  • Select an option

  • Save baeyeongpyo/c9d9f6ab304068dbcc7ca657282e31d4 to your computer and use it in GitHub Desktop.

Select an option

Save baeyeongpyo/c9d9f6ab304068dbcc7ca657282e31d4 to your computer and use it in GitHub Desktop.
class AnkoUIMaker(val context: Context) {
private val constraintlayoutID = R.id.ankoConstraintLayout
fun UiMake(): View =
context.constraintLayout {
id = constraintlayoutID
// 추가
textView("Anko Hello").lparams(wrapContent, wrapContent) {
startToStart = constraintlayoutID
endToEnd = constraintlayoutID
topToTop = constraintlayoutID
bottomToBottom = constraintlayoutID
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment