コード例 #1
0
ファイル: FoodMenuActivity.java プロジェクト: cherakkara/iwms
 public void m13545a(bz bzVar) {
   m13556g();
   String str = Trace.NULL;
   Set<Long> keySet = this.f9630n.keySet();
   ArrayList arrayList = new ArrayList();
   for (Long l : keySet) {
     ba baVar = (ba) bzVar.getPartialItems().get(((Integer) this.f9631o.get(l)).intValue());
     arrayList.add(
         new ba(
             baVar.getListing_id(),
             baVar.getMerchant_id(),
             baVar.getMerchant_name(),
             baVar.getTitle(),
             baVar.getDescription(),
             ((Integer) this.f9630n.get(l)).intValue(),
             baVar.getPrice(),
             baVar.getAttributes()));
   }
   int i = 0;
   for (Integer intValue : this.f9630n.values()) {
     i = intValue.intValue() + i;
   }
   m13519a(str, arrayList, i);
 }
コード例 #2
0
ファイル: FoodMenuActivity.java プロジェクト: cherakkara/iwms
 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())));
 }