示例#1
0
    @Override
    public void onPullDownToRefresh(PullToRefreshBase refreshView) {
      String nowTime =
          DateUtils.formatDateTime(
              getActivity(),
              System.currentTimeMillis(),
              DateUtils.FORMAT_SHOW_TIME
                  | DateUtils.FORMAT_SHOW_DATE
                  | DateUtils.FORMAT_ABBREV_ALL);
      refreshView.getLoadingLayoutProxy().setLastUpdatedLabel(nowTime);
      //            nowTimeTV.setText(nowTime);
      String pathURL =
          URLs.JIJIANGKAISHI
              + "&"
              + URLs.PG_CUR
              + "="
              + 1
              + "&"
              + URLs.PG_SIZE
              + "="
              + PAGE_SIZE_NUM;

      new RequestDataThreadForJJKS(pathURL).start();
      //            ToastUtil.showToast(getActivity(), "2222222222222" + nowTime);
    }
示例#2
0
    @Override
    public void onRefresh(PullToRefreshBase refreshView) {
      if (refreshView.isShownHeader()) {

        String nowTime =
            DateUtils.formatDateTime(
                getActivity(),
                System.currentTimeMillis(),
                DateUtils.FORMAT_SHOW_TIME
                    | DateUtils.FORMAT_SHOW_DATE
                    | DateUtils.FORMAT_ABBREV_ALL);
        refreshView.getLoadingLayoutProxy().setLastUpdatedLabel(nowTime);

        String pathURL =
            URLs.TEMAIZHONG
                + "&"
                + URLs.PG_CUR
                + "="
                + 1
                + "&"
                + URLs.PG_SIZE
                + "="
                + PAGE_SIZE_NUM;

        new RequestDataThreadForTMZ(pathURL).start();

      } else if (refreshView.isShownFooter()) {

        tmz_Cur_Num += 1;
        String pathURL =
            URLs.TEMAIZHONG
                + "&"
                + URLs.PG_CUR
                + "="
                + tmz_Cur_Num
                + "&"
                + URLs.PG_SIZE
                + "="
                + PAGE_SIZE_NUM;
        new RequestDataThreadForTMZ(pathURL).start();
      }
    }