vinny202007/20/2020, 6:54 PM
satyan07/20/2020, 6:59 PM
return a generic of type
val button: Button = findViewById(...)
will provide you a
val button = findViewById<Button>(...)
(or crash at runtime if it's not a button). On the other hand View Binding (starting AGP 3.6) are type-safe, null safe (ex: a view present in a layout configuration and absent in another configuration).
vinny202007/20/2020, 7:18 PM