Extending a class with more than one activity with interface in android

Basically, I'm new with android and java and I know this question was asked for too many times, but I couldn't understand something. I'm reading a guide that says I need to extend AppCompatActivity, so I could use the toolbar benefits from this class. Then I read another guide that says I need to extend another class, such as ExpandableListActivity. Both those classes weren't created by me. How can I create such an interface that can include both the classes, and implement it?

1 answer

  • answered 2018-10-11 21:26 Ibtihaj Uddin

    The thing you are trying to achieve isn't supported by java and you should make peace with it before embracing Android. The best thing you can do is implement the list functionality by yourself inside the same activity extending AppCompatActivity.