skip to Main Content

Android Studio – How can you call a method of an activity from another activity?

Here is my first activity public class FirstActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_first); } public void addNumbers() { //// } } public class SecondActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState);…

VIEW QUESTION
Back To Top
Search