1.解决Fragment注销EventBus广播,其禁止加载数据状态按返回进行重置为可加载的状态
This commit is contained in:
@@ -135,6 +135,7 @@ public class CategoryActivity extends FragmentActivity {
|
||||
if(currentFragment.onKeyDown(keyCode,event)){
|
||||
return true;
|
||||
}else {
|
||||
currentFragment.resetDisableRefreshDataFlag();
|
||||
return super.onKeyDown(keyCode,event);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,7 +152,7 @@ public abstract class BaseFragment extends Fragment {
|
||||
protected abstract void initView(View view);
|
||||
protected abstract void initData();
|
||||
|
||||
|
||||
public abstract void resetDisableRefreshDataFlag();
|
||||
@Override
|
||||
public void setEnterTransition(Transition transition) {
|
||||
super.setEnterTransition(transition);
|
||||
|
||||
@@ -153,7 +153,10 @@ public abstract class CategoryFragment extends BaseFragment implements AppnetCal
|
||||
mCategoryAppPresenter.loadAppByCategory(category);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void resetDisableRefreshDataFlag() {
|
||||
disableFreshData=false;
|
||||
}
|
||||
|
||||
protected abstract void toNextPage();
|
||||
|
||||
|
||||
@@ -135,9 +135,10 @@ public class MainFragment extends BaseFragment implements ShortAppInfoAdapter.On
|
||||
ADSWindowManager.getInstance().startVideo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetDisableRefreshDataFlag() {
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@SuppressLint("UnsafeOptInUsageError")
|
||||
|
||||
Reference in New Issue
Block a user