I have an activity named Create and a class names Begin .I would like to access the methods in activity using the class begin.
Asked
Active
Viewed 29 times
1 Answers
1
Hello @Ehtizad Zashkiyor ,
You can't really access another activity method, and the way that it is possible are not reccomanded.
it's better for you to try to make a java class with the methods you want and let both your activity get the methods form there.
from a quick search in google I found few questions that will help you:
Call a public method in the Activity class from another class?
How to call another activity method in android studio? (this one is straight to the answer of it)
plus, it wont hurt you to read this: "Application Fundamentals" which is from the android developer website.
I hope this answers to your question, if you'll have any further concerns, don't be shy and ask.

Lidor Eliyahu Shelef
- 1,299
- 1
- 14
- 35