Kotlin Extension Functions Databinding

后端 未结 3 1316
独厮守ぢ
独厮守ぢ 2021-02-06 21:36

Is there any possibility to use extension function with a databinding? XML:


    

        
3条回答
  •  无人及你
    2021-02-06 22:01

    You have to import CityKt firstly into xml

    
    

    int the data section then you can use it like this

    
    

    If you review CityKt you will see that there is static Java method with City as first argument

提交回复
热议问题