-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Issue Description:
[Chore] Replace findViewById() with ViewBinding
Problem:
The app currently uses findViewById() to reference UI elements, which is boilerplate-heavy, prone to NullPointerExceptions, and less efficient compared to ViewBinding. Migrating to ViewBinding will improve code readability, performance, and type safety.
Expected Solution:
- Enable
ViewBindingin the project by updating thebuild.gradlefile. - Replace all instances of
findViewById()withViewBinding. - Ensure proper lifecycle handling of binding instances to avoid memory leaks.
Steps to Implement:
- Enable ViewBinding in
build.gradle:android { viewBinding { enable = true } }
- Replace
findViewById()in activities, fragments, and adapters withViewBinding. - Use proper lifecycle management for binding in fragments to avoid memory leaks.
Acceptance Criteria:
- All
findViewById()references are replaced withViewBinding. - UI interactions remain fully functional after the migration.
- Proper lifecycle management is followed in fragments and adapters.
Let me know if you need code examples for the migration! 🚀
Metadata
Metadata
Assignees
Labels
No labels