I am working on a dynamic list which is viewed on RecyclerView. So far it is possible to add and remove elements. Also the user can change the content of every single element through several popUpWindows. However, MyViewHolder class got quite long due to many onClickListeners. So I carried MyRecyclerViewAdapter class in a separate file from the rest of the activity. Now,
Is it a good practice to keep
MyViewHolderclass long with many click listeners (doing the most of the work inside the Adapter object), or should I retrieve the relevant data fromMyRecyclerViewAdaptersomehow and do the 'delete, add, edit text' work insideonCreatesection?What are the most efficient, simple and fast solutions to show a totally new and different view when all elements are deleted? I tried VISIBLE, GONE solution but MyAdapter is in a separate file and I don't know how to communicate with the onCreate section to transfer real-time size of the dynamic list.