Ejemplo n.º 1
0
 @Override
 public void onActivityResult(int requestCode, int resultCode, Intent data) {
   super.onActivityResult(requestCode, resultCode, data);
   if (requestCode == 0 && resultCode == Activity.RESULT_OK) {
     curPageNo = 1;
     dynamicBeanList.clear();
     dataSource.clear();
     mAdapter.notifyDataSetChanged();
     initDataSource();
   }
 }
Ejemplo n.º 2
0
  private void parseData(List<DynamicBean> list) {
    if (!ListUtils.isEmpty(list)) {

      for (final DynamicBean bean : list) {
        Map<String, Object> map = new HashMap<>();
        map.put(from[0], JDUtils.getRemoteImagePath(bean.getIcon()));
        map.put(from[1], bean.getName());
        map.put(from[2], JDUtils.formatDate(bean.getCreateTime(), "yyyy-MM-dd HH:mm"));
        map.put(from[3], bean.getContent());
        dataSource.add(map);
      }
      mAdapter.notifyDataSetChanged();
    }
  }
  private void parseData(List<OutReservationHistoryBean> addList) {
    if (!ListUtils.isEmpty(addList)) {

      for (final OutReservationHistoryBean bean : addList) {
        Map<String, Object> map = new HashMap<>();
        map.put(from[0], bean.getClinic_flag() == 0 ? "普通号" : bean.getDoctor_name());
        map.put(from[1], bean.getVisit_name());
        map.put(from[2], bean.getRequest_date() + "   " + bean.getTime_name());
        if (!TextUtils.isEmpty(bean.getCharge_price())) {
          map.put(from[3], "¥" + String.format(bean.getCharge_price(), ".2f"));
        } else {
          map.put(from[3], "");
        }
        map.put(from[4], bean.getVisit_flag());
        map.put("data", bean);
        dataSource.add(map);
      }
    }
    mAdapter.notifyDataSetChanged();
  }