csdn地址:http://download.csdn.net/download/android_zhengyongbo/9994029 这里记录一下需要关注的地方,setUserVisibleHint方法比onCreate执行要早