Step 1: Add any functions you want to call into the interface (EventListener).
Step 2: Implement those functions in your MainActivity.
Step 3: Create the listener in your Fragment and attach it to the Activity.
Step 4: Call any functions on the listener.
mmm i used this code
android.app.Fragment tt=getFragmentManager().findFragmentById(R.id.detail_fragment);
DetailFragment tx=(DetailFragment) tt;
// and now can you call methos from inside the class DetailFragment->event listener