一品网
  • 首页

kotlin中的类java switch语法


    @RequiresApi(Build.VERSION_CODES.N)
    @OnClick(R.id.search, R.id.start_data, R.id.end_data)
    open fun onViewClicked(v: View?) {
        when (v?.id) {
            R.id.start_data -> showDatePicker(startType)
            R.id.end_data -> showDatePicker(endType)
            R.id.search -> getPageDataList()
        }
    }    
kotlin

相关


Android Kotlin opencv MatOfPoint 转 MatOfPoint2f 报错踩坑 (解决)

Kotlin开发 委托

Kotlin:类

Kotlin/JVM HttpURLConnection的简单使用

[Kotlin] 懒加载Lazy<T>简介与应用

浅谈Kotlin(八):空安全、空类型

android 编译错误::Extension with name 'kotlin' does not exist

Android 内存泄漏检测工具 LeakCanary(Kotlin版)的实现原理

有意思,发现Kotlin一个神奇的bug!

Kotlin 协程二 —— 通道 Channel

Kotlin 协程+Retrofit 最优雅的网络请求使用

[Kotlin设计模式笔记] 构建器模式Builder

标签

一品网 冀ICP备14022925号-6