@Override public void onPause() { super.onPause(); if (mApplications != null) { mApplications.pause(); } }
public void pause() { if (mApplications != null) { mApplications.pause(); } if (mRunningProcessesView != null) { mRunningProcessesView.doPause(); } }
@Override public void onPause() { super.onPause(); mActivityResumed = false; mApplicationsAdapter.pause(); if (mResumedRunning) { mRunningProcessesView.doPause(); mResumedRunning = false; } mTabHost.getTabWidget().setEnabled(false); }
private void selectView(int which) { if (which == VIEW_LIST) { if (mResumedRunning) { mRunningProcessesView.doPause(); mResumedRunning = false; } if (mCurView != which) { mRunningProcessesView.setVisibility(View.GONE); mListContainer.setVisibility(View.VISIBLE); mLoadingContainer.setVisibility(View.GONE); } if (mActivityResumed) { mApplicationsAdapter.resume(mFilterApps, mSortOrder); } } else if (which == VIEW_RUNNING) { if (!mCreatedRunning) { mRunningProcessesView.doCreate(null); mRunningProcessesView.mAdapter.setShowBackground(mShowBackground); mCreatedRunning = true; } boolean haveData = true; if (mActivityResumed && !mResumedRunning) { haveData = mRunningProcessesView.doResume(this, mRunningProcessesAvail); mResumedRunning = true; } mApplicationsAdapter.pause(); if (mCurView != which) { if (haveData) { mRunningProcessesView.setVisibility(View.VISIBLE); } else { mLoadingContainer.setVisibility(View.VISIBLE); } mListContainer.setVisibility(View.GONE); } } mCurView = which; final Activity host = getActivity(); if (host != null) { host.invalidateOptionsMenu(); } }