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