Пример #1
0
  private void sendNews(String newsMessage) {
    onLoadBegins();
    mRestService.addEventNews(
        User.currentUser().getUserId(),
        mEvent.getId(),
        newsMessage,
        new HttpHelper.RestCallback<Status>() {
          @Override
          public void failure(Status restError) {
            onLoadFinished();
          }

          @Override
          public void success(Status status, Response response) {
            Toast.makeText(getActivity(), R.string.enf_new_added_success, Toast.LENGTH_SHORT)
                .show();

            mAdapter.resetData();
            loadEventNews(0);

            onLoadFinished();
          }
        });
  }
Пример #2
0
 private void loadEventNews(int page) {
   mRestService.getEventNews(mEvent.getId(), page, HttpHelper.DEFAULT_COUNT, mLoaderCallback);
 }
Пример #3
0
 @Override
 public String getTitle() {
   return mEvent.getName();
 }