Skip to content

[Perf] Add ViewBinding to the project #65

@aakash1313

Description

@aakash1313

View binding has important advantages over using findViewById:

  1. Null safety: Since view binding creates direct references to views, there's no risk of a null pointer exception due to an invalid view ID. Additionally, when a view is only present in some configurations of a layout, the field containing its reference in the binding class is marked with @nullable.
  2. Type safety: The fields in each binding class have types matching the views they reference in the XML file. This means that there's no risk of a class cast exception.

https://developer.android.com/topic/libraries/view-binding

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions