Optimize fragment swith lifecycle