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