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.
I want to call Method (function) of Fragment from Parent Activity.
Can you explain more about this?
Your code looks like exchange data from fragment to Activity.