robin
02/16/2017, 1:55 PMmiha-x64
02/16/2017, 1:57 PMclass MainActivity {
private lateinit var someView: View
override fun onCreate(state: bundle) {
super.onCreate();
someView = some_view;
}
}
robin
02/16/2017, 1:59 PMlateinit
modifier, and neither do I like separating initialization from declaration. I've not noticed a performance impact yet by using the lazy delegate in this situation.miha-x64
02/16/2017, 2:00 PMrobin
02/16/2017, 2:01 PMmiha-x64
02/16/2017, 2:03 PMrobin
02/16/2017, 2:10 PMmiha-x64
02/16/2017, 2:13 PMrobin
02/16/2017, 2:17 PMclass MainActivity {
private val someView: View
get() = some_view
}
How does that look to you?miha-x64
02/16/2017, 2:19 PMinline val
.robin
02/16/2017, 2:19 PMmiha-x64
02/16/2017, 2:19 PMrobin
02/16/2017, 2:19 PMmiha-x64
02/16/2017, 2:20 PMinline fun someView() = some_view
.kingsley
02/17/2017, 2:01 PMrobin
02/17/2017, 4:49 PM