view binding is a type-safe way to interact with your layout from view. Every XML created gets a generated Binding class which you can use to access the ui components.
this is usually preferred over findViewById as it is type-safe and makes your code look cleaner, especially if you have a lot of components, you can avoid having tons of global variables.
view binding is a type-safe way to interact with your layout from view. Every XML created gets a generated Binding class which you can use to access the ui components. this is usually preferred over findViewById as it is type-safe and makes your code look cleaner, especially if you have a lot of components, you can avoid having tons of global variables.
please see https://developer.android.com/topic/libraries/view-binding