Ejemplo n.º 1
0
  @Override
  protected List<String> doInBackground(Map... pars) {

    List<Offer> offers = OfferBO.listOffers(pars[0]);
    List<String> teste = new ArrayList<String>();

    int contador = OfferBO.count_offer(pars[0]);
    Log.i("QUANTIDADE DE REGISTROS", Integer.toString(contador));

    for (Offer of : offers) {
      Log.i("Titulo da oferta", of.getTitle());
      Log.i("STATUS", of.getStatus());
      Log.i("METRICS", of.getMetrics());
      Log.i("PARCELS", of.getParcels());
      Log.i("PARCELS OFF IMPOST", of.getParcelsOffImpost());
      Log.i("PUBLIC STR", of.getPublicStr());
      Log.i("WEIGHT", String.valueOf(of.getWeight()));
      Calendar data = of.getBeginsAt();
      SimpleDateFormat s = new SimpleDateFormat("dd/MM/yyyy");
      String endsDate = s.format(data.getTime());
      Log.i("BEGIN DATE", endsDate);

      teste.add(of.getTitle());
    }

    return teste;
  }
Ejemplo n.º 2
0
  @Override
  public View getView(int position, View view, ViewGroup parent) {

    Offer offer = offers.get(position);

    view = mInflate.inflate(R.layout.activity_item_offer, null);

    ((TextView) view.findViewById(R.id.textView_tituloOferta2)).setText(offer.getTitle());
    ((TextView) view.findViewById(R.id.textView_tituloOferta3)).setText(offer.getTitle());
    ((TextView) view.findViewById(R.id.textView_tituloOferta1)).setText(offer.getTitle());

    return view;
  }