How to start using view binding //Android Kotlin Dev Diary

First, open your app/build.gradle file Inside the android{} block of app/build.gradle, add the following: buildFeatures { viewBinding = true } Sync project with gradle files. In your activity or fragment, define the following class-wide property:

Replace the FragmentorActivityNameBinding above with the appropriate binding class name. Tip: The binding class name is based on the […]

Read More