@Override public void onActivityCreated(@Nullable Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); mPresenter = initPresenter(); if (mPresenter != null) { mPresenter.setTag(TextUtils.concat(type, String.valueOf(tabPosition))); } initActivityCreated(); mStatusView.getEmptyView().setOnClickListener(v -> clickNetWork()); mStatusView.getErrorView().setOnClickListener(v -> clickNetWork()); }
@Override protected void initBundle() { super.initBundle(); type = bundle.getString(FRAGMENT_TYPE); }
@Override public void onDestroyView() { if (mPresenter != null) mPresenter.cancelZhiZhuDetailNetWork(); super.onDestroyView(); }
@Override public void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); bundle = getArguments(); if (bundle != null) { initBundle(); } }
@Override protected void clickNetWork() { super.clickNetWork(); if (!swipeRefreshLayout.isRefreshing()) { onRefresh(); } }
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { if (coordinatorLayout == null) { coordinatorLayout = (CoordinatorLayout) getActivity().findViewById(R.id.activityRootView); } if (mStatusView == null) { mStatusView = new StatusLayout(container.getContext()); mStatusView.setSuccessView(getLayoutId(), new FrameLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)); mStatusView.setEmptyView(R.layout.layout_empty_view); mStatusView.setErrorView(R.layout.layout_network_error); setStatusViewStatus(StatusLayout.SUCCESS); isPrepared = true; } initById(); return mStatusView; }
@Override protected void clickNetWork() { super.clickNetWork(); if (!swipeRefreshLayout.isRefreshing()) { onRefresh(); } }
@Override protected void clickNetWork() { super.clickNetWork(); if (!swipeRefreshLayout.isRefreshing()) { onRefresh(); } }
@Override protected void initBundle() { super.initBundle(); type = bundle.getString(FRAGMENT_TYPE); }
@Override public void onDestroyView() { super.onDestroyView(); RxBus.getInstance().unregister(getClass().getSimpleName()); }
@Override protected void clickNetWork() { super.clickNetWork(); if (!swipeRefreshLayout.isRefreshing()) { onRefresh(); } }
@Override protected void initBundle() { super.initBundle(); type = bundle.getString(FRAGMENT_TYPE); }
@Override public void onDestroyView() { super.onDestroyView(); RxBus.getInstance().unregister(ApiConfig.Type.BI_QU_GE); }
@Override protected void clickNetWork() { super.clickNetWork(); if (!swipeRefreshLayout.isRefreshing()) { onRefresh(); } }
@Override protected void initBundle() { super.initBundle(); tabPosition = bundle.getInt(FRAGMENT_INDEX); type = bundle.getString(FRAGMENT_TYPE); }
@Override public void onDestroyView() { RxBus.getInstance().unregister(ApiConfig.BUS); super.onDestroyView(); }
@Override protected void clickNetWork() { super.clickNetWork(); if (!swipeRefreshLayout.isRefreshing()) { onRefresh(); } }
@Override protected void initBundle() { super.initBundle(); tabPosition = bundle.getInt(FRAGMENT_INDEX); type = bundle.getString(FRAGMENT_TYPE); }
@Override protected void clickNetWork() { super.clickNetWork(); if (!swipeRefreshLayout.isRefreshing()) { onRefresh(); } }
@Override protected void initBundle() { super.initBundle(); tabPosition = bundle.getInt(FRAGMENT_INDEX); type = bundle.getString(FRAGMENT_TYPE); }