Ejemplo n.º 1
0
 public void appendData(DPObject paramDPObject)
 {
   this.isComposeEnd = paramDPObject.getString("IsComposeEnd");
   this.nextComposeStartIndex = paramDPObject.getString("NextComposeStartIndex");
   this.emptyMsg = paramDPObject.getString("EmptyMsg");
   paramDPObject = paramDPObject.getArray("List");
   if (paramDPObject != null)
     Collections.addAll(this.orderList, paramDPObject);
   if ((this.orderList != null) && (this.orderList.size() > 1))
     HuiPayListActivity.access$402(HuiPayListActivity.this, (DPObject)this.orderList.get(this.orderList.size() - 1));
   notifyDataSetChanged();
 }
Ejemplo n.º 2
0
 private void startAddReviewActivity(DPObject paramDPObject)
 {
   if (paramDPObject == null);
   String str;
   do
   {
     return;
     str = paramDPObject.getString("ActionURL");
   }
   while (TextUtils.isEmpty(str));
   startActivity(new Intent("android.intent.action.VIEW", Uri.parse(str).buildUpon().appendQueryParameter("checkdraft", "true").build()));
   statisticsEvent("addreview5", "addreview5_submit_recommend_item", paramDPObject.getString("CommendReason") + "|" + paramDPObject.getInt("ID"), 0);
 }
 public void submitWeddingBookingInfo()
 {
   StringBuffer localStringBuffer = new StringBuffer("http://m.dianping.com/wed/mobile/hunyan/fuzzy/mobileWedHotelFuzzyRecommendResult/");
   localStringBuffer.append("shopId=").append(this.shopId);
   localStringBuffer.append("&phoneNo=").append(this.phoneNum);
   localStringBuffer.append("&dpId=").append(DeviceUtils.dpid());
   localStringBuffer.append("&cityId=").append(cityId());
   localStringBuffer.append("&tableType=").append(this.tableType);
   localStringBuffer.append("&priceType=").append(this.priceType);
   localStringBuffer.append("&regionType=").append(this.regionType);
   localStringBuffer.append("&categoryIds=").append(this.categoryIds);
   localStringBuffer.append("&source=").append(this.source);
   Object localObject2 = "";
   Object localObject1;
   if ((this.selectedRegions != null) && (this.selectedRegions.size() > 0))
   {
     Iterator localIterator = this.selectedRegions.iterator();
     if (localIterator.hasNext())
     {
       String str = (String)localIterator.next();
       DPObject[] arrayOfDPObject = this.regionList;
       int j = arrayOfDPObject.length;
       int i = 0;
       for (localObject1 = localObject2; ; localObject1 = localObject2)
       {
         localObject2 = localObject1;
         if (i >= j)
           break;
         DPObject localDPObject = arrayOfDPObject[i];
         localObject2 = localObject1;
         if (str.equals(localDPObject.getString("Name")))
           localObject2 = (String)localObject1 + localDPObject.getInt("ID") + ",";
         i += 1;
       }
     }
     localObject1 = ((String)localObject2).substring(0, ((String)localObject2).length() - 1);
   }
   while (true)
   {
     localStringBuffer.append("&regionIds=").append((String)localObject1);
     localStringBuffer.append("?dpshare=0");
     try
     {
       localObject1 = URLEncoder.encode(localStringBuffer.toString(), "UTF-8");
       localObject2 = new Intent("android.intent.action.VIEW");
       ((Intent)localObject2).setData(Uri.parse("dianping://weddinghotelweb?url=" + (String)localObject1));
       startActivity((Intent)localObject2);
       finish();
       return;
       localObject1 = "0";
     }
     catch (UnsupportedEncodingException localUnsupportedEncodingException)
     {
     }
   }
 }
 protected void setupAddressView(DPObject paramDPObject) {
   onDeliveryAdressChanged(paramDPObject);
   if (paramDPObject == null) return;
   SpannableString localSpannableString = new SpannableString(paramDPObject.getString("Receiver"));
   localSpannableString.setSpan(
       new AbsoluteSizeSpan(getResources().getDimensionPixelSize(R.dimen.text_size_17)),
       0,
       localSpannableString.length(),
       33);
   paramDPObject = new SpannableString(paramDPObject.getString("ShowAddress"));
   paramDPObject.setSpan(
       new AbsoluteSizeSpan(getResources().getDimensionPixelSize(R.dimen.text_size_17)),
       0,
       paramDPObject.length(),
       33);
   SpannableStringBuilder localSpannableStringBuilder = new SpannableStringBuilder();
   localSpannableStringBuilder.append(localSpannableString).append("\n").append(paramDPObject);
   this.addressView.setTitle(localSpannableStringBuilder);
 }
Ejemplo n.º 5
0
 private LinearLayout buildRule(DPObject paramDPObject) {
   LinearLayout localLinearLayout1 =
       (LinearLayout) LayoutInflater.from(this).inflate(R.layout.huihui_rule_item, null, false);
   TextView localTextView = (TextView) localLinearLayout1.findViewById(R.id.title);
   ImageView localImageView = (ImageView) localLinearLayout1.findViewById(R.id.split_line);
   LinearLayout localLinearLayout2 = (LinearLayout) localLinearLayout1.findViewById(R.id.content);
   localTextView.setText(paramDPObject.getString("Title"));
   paramDPObject = paramDPObject.getArray("RuleDetailDos");
   if ((paramDPObject != null) && (paramDPObject.length > 0)) {
     displayDialogContent(localLinearLayout2, paramDPObject);
     localImageView.setVisibility(0);
     localLinearLayout2.setVisibility(0);
     return localLinearLayout1;
   }
   localImageView.setVisibility(8);
   localLinearLayout2.setVisibility(8);
   return localLinearLayout1;
 }
Ejemplo n.º 6
0
 private void updateEncourageView(DPObject paramDPObject)
 {
   if (paramDPObject == null)
     return;
   Object localObject = paramDPObject.getStringArray("EncourageTips");
   TextView localTextView = (TextView)findViewById(R.id.review_success_title);
   localObject = TextUtils.jsonParseText(localObject[0]);
   findViewById(R.id.review_success_encourage_subtitle_lay).setVisibility(8);
   if (paramDPObject.getInt("ScoreState") == 1)
   {
     localTextView.setText((CharSequence)localObject);
     new Handler().postDelayed(new Runnable()
     {
       public void run()
       {
         ReviewSucceedActivity.this.requestEncourageData();
       }
     }
     , 2000L);
     return;
   }
   if (paramDPObject.getInt("EncourageStyle") == 1)
   {
     localTextView.setText((CharSequence)localObject);
     return;
   }
   findViewById(R.id.review_success_encourage_subtitle_lay).setVisibility(0);
   localTextView.setText("感谢您的点评!");
   ((TextView)findViewById(R.id.review_success_sub_title)).setText((CharSequence)localObject);
   localTextView = (TextView)findViewById(R.id.review_success_link_text);
   localTextView.setText(paramDPObject.getString("LinkText"));
   localTextView.setOnClickListener(new View.OnClickListener(paramDPObject)
   {
     public void onClick(View paramView)
     {
       ReviewSucceedActivity.this.startActivity(this.val$reviewEncourage.getString("Link"));
     }
   });
 }
Ejemplo n.º 7
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;
   }
 }
Ejemplo n.º 8
0
 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;
 }
Ejemplo n.º 9
0
 public void setNotification(DPObject paramDPObject)
 {
   String str3 = paramDPObject.getString("Name");
   Object localObject = paramDPObject.getString("Content");
   int n = paramDPObject.getInt("Type");
   String str1 = paramDPObject.getString("Image");
   long l = paramDPObject.getTime("Time");
   String str2 = paramDPObject.getString("Quote");
   int m = paramDPObject.getInt("ContentStyle");
   boolean bool = paramDPObject.getBoolean("IsRead");
   int i;
   if ((0x8000000 & m) == 134217728)
     i = 1;
   while (true)
   {
     int j;
     label88: int k;
     if ((0x4000000 & m) == 67108864)
     {
       j = 1;
       if ((0x2000000 & m) != 33554432)
         break label453;
       k = 1;
       label101: if ((0x1000000 & m) != 16777216)
         break label459;
       m = 1;
       label114: if (!TextUtils.isEmpty((CharSequence)localObject))
         break label465;
       localObject = "";
       paramDPObject = (DPObject)localObject;
       if (i != 0)
         paramDPObject = "<b>" + (String)localObject + "</b>";
       localObject = paramDPObject;
       if (j != 0)
         localObject = "<i>" + paramDPObject + "</i>";
       paramDPObject = (DPObject)localObject;
       if (k != 0)
         paramDPObject = "<u>" + (String)localObject + "</u>";
       localObject = paramDPObject;
       if (m != 0)
         localObject = "<strike>" + paramDPObject + "</strike>";
       paramDPObject = ((String)localObject).replace("\r\n", "<br>");
       this.name.setText(str3);
     }
     try
     {
       this.content.setText(Html.fromHtml(paramDPObject));
       paramDPObject = new Date(l);
       this.time.setText(DateUtil.format2(paramDPObject));
       if (this.showThumb)
       {
         paramDPObject = findViewById(R.id.thumb);
         paramDPObject.setVisibility(0);
         if (n == 3)
         {
           localObject = (LinearLayout.LayoutParams)paramDPObject.getLayoutParams();
           ((LinearLayout.LayoutParams)localObject).width = ViewUtils.dip2px(getContext(), 54.0F);
           ((LinearLayout.LayoutParams)localObject).height = ViewUtils.dip2px(getContext(), 54.0F);
           paramDPObject.setLayoutParams((ViewGroup.LayoutParams)localObject);
         }
         this.thumb.setImage(str1);
         if ((str2 != null) && (!str2.equals("")))
           break label495;
         this.quote.setText("");
         this.quote.setVisibility(8);
         if (findViewById(R.id.notification) != null)
         {
           paramDPObject = findViewById(R.id.red_tag);
           if (bool)
             break label515;
           if (paramDPObject != null)
             paramDPObject.setVisibility(0);
         }
         return;
         i = 0;
         continue;
         j = 0;
         break label88;
         label453: k = 0;
         break label101;
         label459: m = 0;
         break label114;
       }
     }
     catch (Exception localException)
     {
       label465: label495: 
       do
         while (true)
         {
           this.content.setText(paramDPObject);
           continue;
           findViewById(R.id.thumb).setVisibility(8);
           continue;
           this.quote.setText(str2);
           this.quote.setVisibility(0);
         }
       while (paramDPObject == null);
       label515: paramDPObject.setVisibility(8);
     }
   }
 }