Reputation: 323
So I don't know if this is possible, so in more detail:
I have my main class public class MainAR extends Activity{
and an object GUIManager
of other class. From that other I want to call a method from MainAR
:
public class MainAR extends Activity{
...
private GUIManager mGUIManager;
...
mGUIManager = new GUIManager(getApplicationContext());
...
public void mehtodMain(){
...
}
}
And then the other class:
public class GUIManager {
private MainAR mainClass;
public GUIManager(Context context){
//mainClass = ???
...
}
private method(){
mainClass.mehtodMain();
}
}
But I have no idea how to initialize mainClass
...
Upvotes: 0
Views: 79
Reputation: 3771
Provide it an instance of your main class
mGUIManager = new GUIManager(MainAR.this);
public GUIManager(MainAR mainClass){
this.mainClass = mainClass;
}
Upvotes: 1