@Override protected void onDestroy() { super.onDestroy(); stopProgressDialog(); UserInfoDataprovider.getInstance().removeOnRequestedListener(mOnUserInfoRequestedListener); TweetsDataprovider.getInstance().removeOnRequestedListener(mOnTweetsRequestedListener); ((WeChatApp) getApplication()).finishApp(); }
private void initData() { startProgressDialog(); UserInfoDataprovider.getInstance().addOnRequestedListener(mOnUserInfoRequestedListener); mTaskCount++; TweetsDataprovider.getInstance().addOnRequestedListener(mOnTweetsRequestedListener); mTaskCount++; mMomentsListView.setOnLoadListener(this); mMomentsListView.setOnRefreshListener(this); }