I have one class which is calling other classes, this class is my main. Is it possible to get somehow instance of this main class, that in others classes i could call main class methods ?
If yes so how this should be done in android with java?
Thanks.
If you are creating the other classes in your main class, one approach would be to pass the current instance of your main class (i.e. `this’) as a parameter to the constructors of the other classes, and have them store that reference for future use.
Alternately, you could simply pass the current instance of your main class as a parameter to the method you are calling, that needs to be able to call back.