android fragment isRemoved method

488 views Asked by At

There is a isRemoving method for fragments in android. Per the documentation, it only tells when a fragment is in the process of being removed. But I need to know whether a fragment has already been removed. Is there a way to find this out? I am using api level 11.

1

There are 1 answers

0
Roger Alien On

For what purpose are you using this method?

There are other convinience methods like isVisible().

If you want to be sure that you are safe to perform any action inside of fragment, it's better to check getActivity(), as it is the only one call that will tell you true when your fragment is legal to perform action.