版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/android_gjw/article/details/78436707
先看一段代码
private var cloth_Rv: RecyclerView ?= null
cloth_Rv!!.setHasFixedSize(true)
?:表示当前是否对象可以为空
!!: 表示当前对象不为空的情况下执行
都是Kotlin为我们提供的检验空指针的方法
《Kotlin语法基础到实战开发》系列课程视频
http://edu.csdn.net/course/detail/6409?locationNum=7&fps=1&ref=srch&loc=1