Kotlin extension — omitting findviewbyid
•
Android
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
二维码