java - Ruby-like modules for Fragments? -
i inherited project have lot of fragments share same functions.
i want refactor have basefragment
these other fragments can extend , shared functions exist. issue i've run these fragments extend different classes: tasklistfragment
, taskfragment
.
is there way me implement basefragment
different types of fragments can use methods - similar how ruby modules work?
you have implement interface tasklistfragment , taskfragment. share methods could/would have implemented separately inside classes. children of each class call method. there more complicated way of doing interface best bet. question should shed little more light on issue.
Comments
Post a Comment