In this video, I show you how to use view binding and why it's preferred over findViewById. In short View Binding replaces findViewById, eliminates the NullPointer and ClassCast exceptions because it generates a binding class for each layout file and holds a direct reference to each of the views that have an id.
Source Code: https://github.com/backpackwithtech/A...
If you have any questions or suggestion you can leave them down in the comment section.