I'm working on a relatively big Android project. This project's app architecture is MVVM, and all layer responsibilities are separated well enough. Still, as this project is getting bigger, it's hard to maintain some, especially UI-related classes. I wonder if there is a better way to handle and shrink the UI class size in the number of code lines (nearly 2500 lines)?
- ex:
SinglePostFragmentcontains all UI-related logic like ( file download status, file type behavior ( pdf, audio, image, video ), like, bookmark, share, showing suggested list as a horizontal list, comments, etc.).
Don't group code by it's type. For eg. folders like ViewModels, Activities, Fragments etc.
You should group it by its functionalites like loginScreen, homeScreen, chatScreen. Each part contains everything which is requrired to run it. Also apis list can be distributed according to it.
By the way this is also recomended by google for android development but not able to find it's link. Sorry about that.