I am new to android and I have a problem. I have one main action that replaces fragments, I want to add a custom listener for these fragments, to do this, I have to get my fragment by tag. However, this gives me a nullPointerException, and that is because I am trying to find the fragment before it is completely replaced. Is there a way to find out when a fragment is completely replaced, and then add my listener? Thanks for any help.
source
share