Exemplo n.º 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();
          }
        });
  }
Exemplo n.º 2
0
 private void loadEventNews(int page) {
   mRestService.getEventNews(mEvent.getId(), page, HttpHelper.DEFAULT_COUNT, mLoaderCallback);
 }
Exemplo n.º 3
0
 @Override
 public String getTitle() {
   return mEvent.getName();
 }