Activity method of fragment call as follows:
MyActivity method = (MyActivity) getActivity ();
method.MyMethod ("string");
Here's how it looks in the Activity:
public void MyMethod (String var)
{
Toast.makeText (MyActivity.this,
var,Toast.LENGTH_SHORT).show();
}
Question. How to call a method on a Fragment of Activity? (Ie, reverse)