/**
* 切换刷新
*/
protected boolean isCreated = false;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
// 标记
isCreated = true;
}
/**
* 此方法目前仅适用于标示ViewPager中的Fragment是否真实可见
*/
@Override
public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser);
if (!isCreated) {
return;
}
if (isVisibleToUser) {
getBillList();
}
}
网友评论