0
I have a activity A
and a activity B
. Activity A has the method metodoUm
and I needed to use this method on Activity B. Does anyone know how I can do this? I would be very grateful.
I’m getting beaten up to look for something on the Internet and I can’t find anything.
I don’t know if I understand you, but have you tried the Active Name? Do not forget to leave the method that Oce wants to use public, so it can be accessed from other classes... I hope to have helped :)
– Jeiferson
If you have this need then your system is poorly designed. An Activity cannot depend on another. One of the reasons(there is more) is that the "other" may at any time have to be discarded by the Android OS.
– ramaral
The friend @ramaral is right. But you can give a search on the method startActivityForResult(), may be an alternative. See an example of use in Soen
– user28595