@Override protected void onDetachedFromWindow() { super.onDetachedFromWindow(); if (mLastUpdateTimeUpdater != null) { mLastUpdateTimeUpdater.stop(); } }
@Override public void onUIRefreshBegin(PtrFrameLayout frame) { mShouldShowLastUpdate = false; hideRotateView(); mProgressBar.setVisibility(VISIBLE); mTitleTextView.setVisibility(VISIBLE); mTitleTextView.setText(R.string.cube_ptr_refreshing); tryUpdateLastUpdateTime(); mLastUpdateTimeUpdater.stop(); }
@Override public void onUIRefreshPrepare(PtrFrameLayout frame) { mShouldShowLastUpdate = true; tryUpdateLastUpdateTime(); mLastUpdateTimeUpdater.start(); mProgressBar.setVisibility(INVISIBLE); mRotateView.setVisibility(VISIBLE); mTitleTextView.setVisibility(VISIBLE); if (frame.isPullToRefresh()) { mTitleTextView.setText(getResources().getString(R.string.cube_ptr_pull_down_to_refresh)); } else { mTitleTextView.setText(getResources().getString(R.string.cube_ptr_pull_down)); } }