Ejemplo n.º 1
0
 private void m13534k() {
   LinearLayout linearLayout = (LinearLayout) findViewById(R.id.ordered_items_lay);
   if (linearLayout.getChildCount() != 0) {
     linearLayout.removeAllViews();
   }
   Set<Long> keySet = this.f9628l.keySet();
   ArrayList arrayList = new ArrayList();
   for (Long l : keySet) {
     bd bdVar = (bd) this.f9627k.get(((Integer) this.f9629m.get(l)).intValue());
     arrayList.add(
         new ba(
             bdVar.getId(),
             bdVar.getMerchant().getId(),
             bdVar.getMerchant().getName(),
             bdVar.getName(),
             bdVar.getDescription(),
             ((Integer) this.f9628l.get(l)).intValue(),
             bdVar.getSale_price(),
             bdVar.getAttributes()));
   }
   LayoutInflater layoutInflater = (LayoutInflater) getSystemService("layout_inflater");
   Double valueOf = Double.valueOf(0.0d);
   Iterator it = arrayList.iterator();
   Double d = valueOf;
   while (it.hasNext()) {
     ba baVar = (ba) it.next();
     View inflate = layoutInflater.inflate(R.layout.food_order_confirmed_item, null, false);
     TextView textView = (TextView) inflate.findViewById(R.id.restaurant_name);
     TextView textView2 = (TextView) inflate.findViewById(R.id.price_amount);
     ((TextView) inflate.findViewById(R.id.item_name))
         .setText(baVar.getQuantity() + " x " + baVar.getTitle());
     textView.setText(baVar.getMerchant_name());
     double price = baVar.getPrice() * ((double) baVar.getQuantity());
     textView2.setText(
         getResources().getString(R.string.rs_symbol) + String.valueOf(Math.round(price)));
     valueOf = Double.valueOf(price + d.doubleValue());
     linearLayout.addView(inflate);
     d = valueOf;
   }
   ((TextView) findViewById(R.id.food_activity_review_total))
       .setText(
           getResources().getString(R.string.rs_symbol)
               + String.valueOf(Math.round(d.doubleValue())));
 }
Ejemplo n.º 2
0
 private void m13539o() {
   m13556g();
   String str = Trace.NULL;
   Set<Long> keySet = this.f9628l.keySet();
   ArrayList arrayList = new ArrayList();
   for (Long l : keySet) {
     bd bdVar = (bd) this.f9627k.get(((Integer) this.f9629m.get(l)).intValue());
     arrayList.add(
         new ba(
             bdVar.getId(),
             bdVar.getMerchant().getId(),
             bdVar.getMerchant().getName(),
             bdVar.getName(),
             bdVar.getDescription(),
             ((Integer) this.f9628l.get(l)).intValue(),
             bdVar.getSale_price(),
             bdVar.getAttributes()));
   }
   int i = 0;
   for (Integer intValue : this.f9628l.values()) {
     i = intValue.intValue() + i;
   }
   m13519a(str, arrayList, i);
 }