I have a native android application with about 20 Classes for 10 Activities.
I want to reuse a function definition in every Activity. I have a bottom bar and clicking on it from any activity should trigger this function. Since Java cant have multiple inheritance, how do i copy this function to where ever i want?
Make
BasicActivityclass and extend it fromActivityand write that method inside it.and now extend every
Activityin your application fromBasicActivity