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.).
SinglePostFragmentyou can always split the logic depending on the functions you need for downloading files & its status, file type behaviour (split different actions depending on file types), etc. Showing suggested list & comments is something that can definitely be split up from the same Fragment to other use cases..