@Override public void write( final File outputFile, final SearchResponse response, final ActionListener<Void> listener) { try { final OnLoadListener onLoadListener = new OnLoadListener(outputFile, listener); onLoadListener.onResponse(response); } catch (final Exception e) { listener.onFailure(new DfContentException("Failed to write data.", e)); } }
private void startLoad() { if (!mLoading && !mRefreshing) { removeCallbacks(mCancel); mReturnToStartPosition.run(); setLoading(true); mLoadListener.onLoad(); } }
/** 如果到了最底部,而且是上拉操作.那么执行onLoad方法 */ private void loadData() { if (mOnLoadListener != null) { // 设置状态 setLoading(true); // mOnLoadListener.onLoad(); } }
public void setLoading(boolean loading) { if (mListView == null) return; isLoading = loading; if (loading) { if (isRefreshing()) { setRefreshing(false); } mListView.setSelection(mListView.getAdapter().getCount() - 1); mOnLoadListener.onLoad(); } else { firstTouchY = 0; lastTouchY = 0; } }
public void onLoad() { if (load_listener != null) { load_listener.onLoad(); } }