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
From Fragment A, to go to B, replace A with B and use addToBackstack() before commit().
addToBackstack()
commit()
Now From Fragment B, to go to C, first use popBackStackImmediate(), this will bring back A. Now replace A with C, just like the first transaction.
popBackStackImmediate()