Kotlin extension — omitting findviewbyid

Now the kotlin Android extension can provide the same experience as these open source libraries without adding any additional code.

① Only one line is required to easily import all control properties in the specified layout file:

② After importing, you can call the corresponding extension of the attribute named with the view control in the XML file:

③ You can use the properties and methods of the corresponding type of object

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>