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.

java multiple inheritance


Comments

Popular posts from this blog

c++ - QTextObjectInterface with Qml TextEdit (QQuickTextEdit) -

javascript - angular ng-required radio button not toggling required off in firefox 33, OK in chrome -

xcode - Swift Playground - Files are not readable -