I recently inherited a project where I have a lot of fragments that share the same functions.
I want to refactor so that I have a BaseFragment
where all these other fragments can extend from and where all shared functions exist. The only issue I've run into is that these fragments extend from different classes: TaskListFragment
and TaskFragment
.
Is there a way for me to implement BaseFragment
so that the different types of fragments can use its methods - similar to how ruby modules work?