setUserVisibleHint需要注意的地方

 
  

Why does the setUserVisibleHint called before onCreateView in Fragment?

附上链接
 
  
http://stackoverflow.com/questions/38104691/why-does-the-setuservisiblehint-called-before-oncreateview-in-fragment
 
  
 
  
原来therefore you want the system to know which priority has this fragment before you ask the system to create the view.
这样我们就不能直接做UI变动,直接做请求数据,或者判断一下然后initView就可以了

你可能感兴趣的:(setUserVisibleHint需要注意的地方)