View Binding
A note about the view binding feature (Android Studio 3.6+) Since Developing Android Apps with Kotlin has launched, a new feature, view binding, has been introduced and is available in Android Studio 3.6 and higher. We don't use view binding because it came out after the course, but it's a feature to be aware of. View binding replaces findViewById . View binding generates a binding object for each XML layout. You use this binding object to reference views, using their resource ids as the name: // Creating a binding object for the main_activity.xml layout binding = ActivityMainBinding . inflate ( layoutInflater ) // Referencing a view with the ID roll_button binding . rollButton View binding has the following benefits over findViewById : Type safety - findViewById requires you to specify the type of view you expect to be returned. For example, if you accidentally specify that you expect an ImageButton to be returned when the a...