private void updateCartInfos(int paramInt1, int paramInt2, int paramInt3)
 {
   setTitle(getString(R.string.sd_title_cart).replace("%s", String.valueOf(paramInt1)));
   this.mTotalPrice.setRMBLabelStyle(3, 2, false, getResources().getColor(R.color.light_red));
   this.mTotalPrice.setRMBLabelValue(this.mCartAdapter.getTotalPrice());
   this.mSummary1.setText(getString(R.string.sd_dish_count).replace("%s", String.valueOf(paramInt3)));
   double d;
   Object localObject;
   boolean bool;
   if (this.mAverage != 0.0D)
   {
     d = this.mCartAdapter.getTotalPrice() / this.mAverage;
     if ((this.isEstimate) && (d > 1.0D) && (paramInt3 != 0) && (this.mCartAdapter.getTotalPrice() / paramInt3 >= 20.0D))
       break label203;
     this.mSummary2.setVisibility(8);
     localObject = this.mSubmit;
     if (paramInt1 <= 0)
       break label292;
     bool = true;
     label159: ((NovaButton)localObject).setEnabled(bool);
     if (this.mCartManager.isOwner != 1)
       break label303;
     localObject = this.mBottomLayout;
     if (paramInt2 > 0)
       break label298;
   }
   label292: label298: for (paramInt1 = 8; ; paramInt1 = 0)
   {
     ((View)localObject).setVisibility(paramInt1);
     return;
     d = 0.0D;
     break;
     label203: if (d % 1.0D != 0.0D)
       this.mSummary2.setText(getString(R.string.sd_advice_2).replace("%a", String.valueOf(()d)).replace("%b", String.valueOf(()d + 1L)));
     while (true)
     {
       this.mSummary2.setVisibility(0);
       break;
       this.mSummary2.setText(getString(R.string.sd_advice_1).replace("%s", String.valueOf(()d)));
     }
     bool = false;
     break label159;
   }
   label303: this.mBottomLayout.setVisibility(8);
 }
 private View createTicketItem(DPObject paramDPObject)
 {
   NovaRelativeLayout localNovaRelativeLayout = (NovaRelativeLayout)LayoutInflater.from(getContext()).inflate(R.layout.shopinfo_scenic_item, null);
   NovaButton localNovaButton = (NovaButton)localNovaRelativeLayout.findViewById(R.id.preorder);
   localNovaRelativeLayout.setGAString("ticket_booking", paramDPObject.getString("Name"));
   localNovaButton.setGAString("bookingticket", paramDPObject.getString("Name") + "_预订");
   Object localObject2 = (TextView)localNovaRelativeLayout.findViewById(R.id.ticket_name);
   Object localObject3 = (TextView)localNovaRelativeLayout.findViewById(R.id.price);
   Object localObject1 = (TextView)localNovaRelativeLayout.findViewById(R.id.original_price);
   LinearLayout localLinearLayout = (LinearLayout)localNovaRelativeLayout.findViewById(R.id.discount);
   ((TextView)localObject2).setText(paramDPObject.getString("Name"));
   ((TextView)localObject3).setText("¥" + PriceFormatUtils.formatPrice(paramDPObject.getDouble("Price")));
   localObject2 = new SpannableString("¥" + PriceFormatUtils.formatPrice(paramDPObject.getDouble("MarketPrice")));
   ((SpannableString)localObject2).setSpan(new StrikethroughSpan(), 1, ((SpannableString)localObject2).length(), 33);
   ((SpannableString)localObject2).setSpan(new ForegroundColorSpan(getResources().getColor(R.color.light_gray)), 0, ((SpannableString)localObject2).length(), 33);
   ((TextView)localObject1).setText((CharSequence)localObject2);
   localObject1 = paramDPObject.getStringArray("Promos");
   localObject2 = new LinearLayout.LayoutParams(-2, -2);
   ((LinearLayout.LayoutParams)localObject2).setMargins(10, 0, 0, 0);
   if (localObject1 != null)
   {
     int i = 0;
     while ((i < localObject1.length) && (i < 2))
     {
       localObject3 = new ColorBorderTextView(getContext());
       ((ColorBorderTextView)localObject3).setBorderColor(getResources().getColor(R.color.tuan_common_orange));
       ((ColorBorderTextView)localObject3).setTextColor(getResources().getColor(R.color.tuan_common_orange));
       ((ColorBorderTextView)localObject3).setTextSize(0, getResources().getDimensionPixelSize(R.dimen.text_size_12));
       ((ColorBorderTextView)localObject3).setSingleLine();
       ((ColorBorderTextView)localObject3).setEllipsize(TextUtils.TruncateAt.END);
       ((ColorBorderTextView)localObject3).setPadding(ViewUtils.dip2px(getContext(), 4.0F), 0, ViewUtils.dip2px(getContext(), 4.0F), 0);
       ((ColorBorderTextView)localObject3).setText(localObject1[i]);
       localLinearLayout.addView((View)localObject3, (ViewGroup.LayoutParams)localObject2);
       i += 1;
     }
   }
   localNovaButton.setOnClickListener(new View.OnClickListener(paramDPObject)
   {
     public void onClick(View paramView)
     {
       try
       {
         paramView = new Intent("android.intent.action.VIEW", Uri.parse(this.val$ticket.getString("BuyUrl")));
         ScenicBookingAgent.this.startActivity(paramView);
         return;
       }
       catch (java.lang.Exception paramView)
       {
       }
     }
   });
   localNovaRelativeLayout.setOnClickListener(new View.OnClickListener(paramDPObject)
   {
     public void onClick(View paramView)
     {
       try
       {
         paramView = new Intent("android.intent.action.VIEW", Uri.parse(this.val$ticket.getString("DetailUrl")));
         ScenicBookingAgent.this.startActivity(paramView);
         return;
       }
       catch (java.lang.Exception paramView)
       {
       }
     }
   });
   return (View)(View)(View)localNovaRelativeLayout;
 }
 private void initViews()
 {
   boolean bool2 = false;
   this.tipBarLayout = ((RelativeLayout)findViewById(R.id.tip_bar));
   this.tipCloseImg = ((ImageView)findViewById(R.id.tip_close));
   this.tipDivider = findViewById(R.id.tip_divider);
   Object localObject = getSharedPreferences("selectdish_together_tipbar", 0);
   label196: int i;
   if ((this.mCartManager.isOwner == 0) && (((SharedPreferences)localObject).getInt("closed", 0) == 0))
   {
     this.tipBarLayout.setVisibility(0);
     this.tipDivider.setVisibility(0);
     this.tipCloseImg.setOnClickListener(new View.OnClickListener((SharedPreferences)localObject)
     {
       public void onClick(View paramView)
       {
         SelectDishCartTogetherActivity.this.tipBarLayout.setVisibility(8);
         SelectDishCartTogetherActivity.this.tipDivider.setVisibility(8);
         paramView = this.val$prefs.edit();
         paramView.putInt("closed", 1);
         paramView.apply();
       }
     });
     this.mListView = ((PullToRefreshListView)findViewById(R.id.sd_cart_list));
     localObject = findViewById(R.id.sd_cart_empty);
     this.mListView.setEmptyView((View)localObject);
     findViewById(R.id.backlist).setOnClickListener(new View.OnClickListener()
     {
       public void onClick(View paramView)
       {
         SelectDishCartTogetherActivity.this.finish();
       }
     });
     this.mBottomLayout = findViewById(R.id.sd_cart_bottom);
     this.mSubmit = ((NovaButton)findViewById(R.id.submit));
     NovaButton localNovaButton = this.mSubmit;
     if (!this.mCartManager.supportPrepay)
       break label495;
     localObject = "确认支付";
     localNovaButton.setText((CharSequence)localObject);
     this.mSubmit.setGAString("submit", this.gaUserInfo);
     this.mSubmit.setOnClickListener(new View.OnClickListener()
     {
       public void onClick(View paramView)
       {
         if (SelectDishCartTogetherActivity.this.accountService().token() != null)
         {
           SelectDishCartTogetherActivity.this.mCartManager.stopPollingRequeset();
           SelectDishCartTogetherActivity.this.requestQuitOrderDishRoom();
           new TogetherSubmitOrderManager().submit(SelectDishCartTogetherActivity.this);
           SelectDishCartTogetherActivity.this.mListView.setMode(PullToRefreshBase.Mode.DISABLED);
           return;
         }
         SelectDishCartTogetherActivity.this.accountService().login(SelectDishCartTogetherActivity.this);
       }
     });
     localObject = (TextView)findViewById(R.id.submit_button_subtitle);
     ((TextView)localObject).setText(this.mCartManager.orderButtonSubTitle);
     if (!TextUtils.isEmpty(this.mCartManager.orderButtonSubTitle))
       break label502;
     i = 8;
     label268: ((TextView)localObject).setVisibility(i);
     this.mTotalPrice = ((RMBLabelItem)findViewById(R.id.sd_cart_price));
     this.mSummary1 = ((TextView)findViewById(R.id.sd_cart_summary1));
     this.mSummary2 = ((TextView)findViewById(R.id.sd_cart_summary2));
     this.mCartAdapter = new SelectDishCartAdapter(null, this.mCartManager, this);
     this.mListView.setAdapter(this.mCartAdapter);
     this.mListView.setOnRefreshListener(this);
     if (this.mCartManager.isOwner != 1)
       break label507;
     super.getTitleBar().addRightViewItem("清空", "clearcart", new View.OnClickListener()
     {
       public void onClick(View paramView)
       {
         SelectDishCartTogetherActivity.this.showClearConfirmAlert();
       }
     });
     updateCartInfos(this.mCartManager.getTotalDishCount() + this.mCartManager.getTotalSelectFreeDishCount(), this.mCartManager.getTotalDishCount() + this.mCartManager.getTotalFreeDishCount(), this.mCartManager.getTotalSingleDishCount() + this.mCartManager.getTotalSelectFreeDishCount());
   }
   while (true)
   {
     boolean bool1 = bool2;
     if (this.mCartManager.getAllDishesinTotalDish() != null)
     {
       bool1 = bool2;
       if (this.mCartManager.getAllDishesinTotalDish().size() > 0)
         bool1 = true;
     }
     setCartClearButtonEnabled(bool1);
     return;
     this.tipBarLayout.setVisibility(8);
     this.tipDivider.setVisibility(8);
     break;
     label495: localObject = "去下单";
     break label196;
     label502: i = 0;
     break label268;
     label507: updateCartInfos(this.mCartManager.getTotalDishCount() + this.mCartManager.getOtherTotalCount(), this.mCartManager.getTotalDishCount() + this.mCartManager.getOtherTotalCount(), this.mCartManager.getTotalSingleDishCount());
   }
 }