Can someone tell me why onAttach()
is not getting called on Fragment
that have been replaced within Activity
?
onDetach()
is working perfectly fine.
The reason why I am asking about that is because I'm trying to change Toolbar
title when different Fragments
are being replaced in Activity
.
EDIT
My question is different because my onAttach()
is getting called when Fragment
is getting replaced, its not called however when rotation occurs.