I have try to close the current fragment by using Imagebutton.
I am in Fragment-A and it will turn to the Fragment-B when I click the button.
And when I clic
getActivity().onBackPressed does the all you need. It automatically calls the onBackPressed method in parent activity.
getActivity().onBackPressed