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就可以了
本文探讨了在Android开发中Fragment生命周期内SetUserVisibleHint被调用的原因及其实现逻辑。解释了为什么该方法会在onCreateView之前被调用,并提供了合理的应用场景建议。
442

被折叠的 条评论
为什么被折叠?



