Answer the question
In order to leave comments, you need to log in
How to make a class available in all activities?
There are a couple of features that are needed on almost every page. And I don’t want to prescribe onclicklistener on each activity class (what if I have to change?!).
Answer the question
In order to leave comments, you need to log in
Options are possible - implement methods in the base class and inherit from it, write extension functions, just write functions separately and use where necessary.
In general, little is known from the question. In the heading is the class, in the body of the function. What does the click listener have to do with it is also unclear.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question