1
Kotlin의 ConstraintLayout에 함수를 구현하는 방법을 알아야합니다.보기에 Kotlin 함수를 구현하는 방법
fun applyCustomPropeties(){
//some stuff
}
val rootLayout = findViewById<ConstraintLayout>(R.id.rootLayout)
rootLayout.applyCustomPropeties()
감사 :
나는 이런 식으로 뭔가를해야합니다. 그 확장 "정적"해결
fun ConstraintLayout.applyCustomProperties() {
//some stuff
//you can use "this" keyword here
}
, 당신이 그 코드를 삽입 그래서 상관없이 :
니스, 감사합니다. – Freiver