<@U5GEWVDJ4> Also you can often replace ``` privat...
# android
m
@mugur Also you can often replace
Copy code
private lateinit var title: TextView
and finding it in code later with
Copy code
private val title by lazy(NONE) { findViewById(R.id.title) as TextView }
or even
Copy code
private val title: TextView by find(R.id.title)
if you create
find
extension for
View
similar to this:
Copy code
@Suppress("UNCHECKED_CAST")
internal fun <T : View> ViewGroup.find(@IdRes id: Int): Lazy<T> = lazy(NONE) { findViewById(id) as T }
👏 1