activity的生命周期:
oncreate-onstart-onresume-onpause-onstop-ondestory; 重新返回的 是onRestart-onStart-onResume。 如果从ActivityA 跳到ACtivityB 执行的生命周期是:
A oncreate -onstart-onresume-onpause; B oncreate -onstart-onresume; A onStop;
activity onpause 的时候 是半可见的就是前面有东西挡住了
但依然可见。onstop是activity完全不可见了。
fragment的生命周 onAttch-onCreate-onCreateView-onActivigtyCreate-onStart-onResume-onpause-onstop-onDestroyView-onDestroy-onDetch;
fragmnentactivigty中存放的 fragmnet 只有最早的那个fragmnet能接收到activity的onResult方法。