The problem
has not been a clear FragmentTrasaction of add, remove, replace, hide, show, replace, attach, detach method is how it affects Fragment of the life cycle? ? ? ? ? ?
Experiments are as follows:
- the Add ()
2.remove ()
3.replace () is equivalent to remove and then the Add
4.hide () lifecycle method will not be called back
5.show () lifecycle method will not be called back
6.detach ()
7. attach ()
Note: after which the log is performed onClick a corresponding method, Fragment of isAdd () method returns the result.