Exemplo n.º 1
0
 private void createTicketCategoryItem(DPObject paramDPObject, boolean paramBoolean1, boolean paramBoolean2)
 {
   if ((paramDPObject == null) || (paramDPObject.getArray("ShopTickets") == null))
     return;
   View localView1 = LayoutInflater.from(getContext()).inflate(R.layout.shopinfo_scenic_category, null);
   Object localObject1 = (TextView)localView1.findViewById(R.id.min_price);
   Object localObject2 = (TextView)localView1.findViewById(R.id.category);
   localView1.findViewById(R.id.arrow).setBackgroundResource(R.drawable.arrow_full_down);
   double d = paramDPObject.getDouble("MinPrice");
   String str = paramDPObject.getString("TicketType");
   ((TextView)localObject1).setText("¥" + PriceFormatUtils.formatPrice(d));
   ((TextView)localObject2).setText(str);
   ((NovaRelativeLayout)localView1.findViewById(R.id.book_item)).setGAString("ticket_booking", str);
   localObject1 = new LinearLayout(getContext());
   localObject2 = new LinearLayout(getContext());
   LinearLayout localLinearLayout = new LinearLayout(getContext());
   ((LinearLayout)localObject1).setOrientation(1);
   ((LinearLayout)localObject2).setOrientation(1);
   localLinearLayout.setOrientation(1);
   int i;
   if (paramBoolean1)
   {
     ((LinearLayout)localObject1).setVisibility(0);
     localLinearLayout.setVisibility(8);
     this.expandView = ((NovaRelativeLayout)LayoutInflater.from(getContext()).inflate(R.layout.shopinfo_scenic_expand, null));
     if (paramBoolean2)
     {
       localView1.findViewById(R.id.line).setVisibility(8);
       this.expandView.findViewById(R.id.line).setVisibility(8);
     }
     ((LinearLayout)localObject1).addView((View)localObject2);
     ((LinearLayout)localObject1).addView(localLinearLayout);
     ((LinearLayout)localObject1).addView(this.expandView);
     ((LinearLayout)localObject1).setBackgroundColor(this.res.getColor(R.color.light_grey));
     i = 0;
     label307: if (i >= paramDPObject.getArray("ShopTickets").length)
       break label391;
     if (paramDPObject.getArray("ShopTickets")[i] != null)
       break label350;
   }
   while (true)
   {
     i += 1;
     break label307;
     ((LinearLayout)localObject1).setVisibility(8);
     break;
     label350: View localView2 = createTicketItem(paramDPObject.getArray("ShopTickets")[i]);
     if (i < 2)
     {
       ((LinearLayout)localObject2).addView(localView2);
       continue;
     }
     localLinearLayout.addView(localView2);
   }
   label391: if (localLinearLayout.getChildCount() > 0)
   {
     this.expandView.setVisibility(0);
     paramDPObject = new TicketFamily(localView1, (View)localObject1, (View)localObject2, localLinearLayout, this.expandView);
     addTicketFamily(paramDPObject);
     if (!paramBoolean1)
       break label488;
   }
   label488: for (paramDPObject.isFatherVisible = true; ; paramDPObject.isFatherVisible = false)
   {
     localView1.setOnClickListener(new View.OnClickListener(paramDPObject, paramBoolean2)
     {
       public void onClick(View paramView)
       {
         ScenicBookingAgent.this.setFatherViewExpandAction(this.val$ticketFamily, this.val$isLast);
       }
     });
     this.expandView.setOnClickListener(new View.OnClickListener(paramDPObject, str)
     {
       public void onClick(View paramView)
       {
         if (this.val$ticketFamily.isBrotherHideVisible)
           GAHelper.instance().contextStatisticsEvent(ScenicBookingAgent.this.getContext(), "ticket_booking", this.val$ticketType + "_收起", 0, "tap");
         while (true)
         {
           ScenicBookingAgent.this.setBrotherHideViewExpandAction(this.val$ticketFamily);
           return;
           GAHelper.instance().contextStatisticsEvent(ScenicBookingAgent.this.getContext(), "ticket_booking", this.val$ticketType + "_更多", 0, "tap");
         }
       }
     });
     return;
     this.expandView.setVisibility(8);
     break;
   }
 }