@Override public void handleMessage(Message msg) { super.handleMessage(msg); switch (msg.what) { case DELAY_AUTO_REFRESH: if (mRefreshDataRequired && !mPullRefreshListView.isRefreshing()) { mPullRefreshListView.demo(); mPullRefreshListView.setRefreshing(false); } else if (mAdapter != null) { mAdapter.notifyDataSetChanged(); } break; } }
@Override public void onResume() { super.onResume(); mHandler.sendEmptyMessageDelayed(DELAY_AUTO_REFRESH, 50); }