What if instead of creating an interface for communication between fragment and activity we could just store the activity's reference from onAttach(Activity activity) method and then use this reference to call getValuesFromFragment(String top,String bottom) which I defined in our main activity .
All i am trying to do is a reverse of what we did while passing top and bottom values from activity to fragment .
I tried to implement it but the activity's reference won't detect the function getValueFromFragment(String top.String bottom) .
Please help guys .