Trying to call a method in my activity from a fragment. I want the fragment to give the method data and to get the data when the method return. I want to achieve similar to call on a static method, but without the use of static because it create problems in the activity.
New to fragments so I need an easy and pedagogic explanation!
Thanks!
From fragment to activty:
From activity to fragment:
If you added fragment via code and used a
tagstring when you added your fragment, usefindFragmentByTaginstead: