Since SDK 26 `findViewById` takes a parameter for ...
# android
n
Since SDK 26
findViewById
takes a parameter for the result type. Unfortunately, this breaks with Kotlin:
Copy code
val myView = findViewById(R.id.myview)
This does not compile anymore, instead you'd have to write:
Copy code
val myView = findViewById<View>(R.id.myview)
val myView: View = findViewById(R.id.myview)
In your case this should work:
Copy code
val mNavigation: View by lazy(LazyThreadSafetyMode.NONE) { findViewById(R.id.navigation) }