摘要: 扩展函数 Kotlin中可以给一个类额外添加这个类中没有的函数,即扩展函数。例如: fun Int.dp2px(context: Context) { TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, this.toFloat(), con 阅读全文
posted @ 2023-05-30 20:34 jqc 阅读(135) 评论(0) 推荐(0) 编辑