// createInstance //public Object createInstance(Class cls) { // Object obj; // try { // Constructor c1 = cls.getDeclaredConstructor(Context.Class); // c1.setAccessible(true); // obj = c1.newInstance(mContext); // } catch (Exception e) { // obj = null; // } // return obj; //} public virtual void onLoadMore() { if (!NetworkUtils.isConnected(ApplicationContext)) { mAdapter.pauseMore(); return; } }
protected void loaddingError() { if (mAdapter.getCount() < 1) { // 说明缓存也没有加载,那就显示errorview,如果有缓存,即使刷新失败也不显示error mAdapter.clear(); } mAdapter.pauseMore(); mRecyclerView.setRefreshing(false); mRecyclerView.showTipViewAndDelayClose("似乎没有网络哦"); }