I want to call public method in main activity from other activity. How can I do that?
class MainActivity extends Activity {
public void myMethod() {}
}
class MyActivity extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// How can I call myMethod() in MainActivity?
}
}
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…