コード例 #1
0
 @Override
 public void onActivityCreated(Bundle bundle) {
   super.onActivityCreated(bundle);
   setUpListView();
   getCommentAdapter().loadComments();
   if (!NetworkUtils.isNetworkAvailable(getActivity())) {
     return;
   }
   if (!mHasAutoRefreshedComments) {
     updateComments(false);
     mPullToRefreshHelper.setRefreshing(true);
     mHasAutoRefreshedComments = true;
   }
 }
コード例 #2
0
 @Override
 public void onDestroyView() {
   super.onDestroyView();
   mPullToRefreshHelper.unregisterReceiver(getActivity());
 }
コード例 #3
0
 @Override
 public void onViewCreated(View view, Bundle savedInstanceState) {
   super.onViewCreated(view, savedInstanceState);
   mPullToRefreshHelper.registerReceiver(getActivity());
 }
コード例 #4
0
 public void setRefreshing(boolean refreshing) {
   mPullToRefreshHelper.setRefreshing(refreshing);
 }