Exemplo n.º 1
0
    public void onClick(View paramView)
    {
      switch (NShopListContentAgent.this.mBannerID)
      {
      default:
        return;
      case 1:
        paramView = (NewShopListDataSource)NShopListContentAgent.this.getDataSource();
        NShopListContentAgent.this.getFragment().startActivity(new Intent("android.intent.action.VIEW", Uri.parse(paramView.weddingBanquetUrl)));
        return;
      case 2:
      }
      if (TextUtils.isEmpty(NShopListContentAgent.this.getToken()))
      {
        NShopListContentAgent.this.accountService().login(new LoginResultListener()
        {
          public void onLoginCancel(AccountService paramAccountService)
          {
          }

          public void onLoginSuccess(AccountService paramAccountService)
          {
            NShopListContentAgent.this.sendHospitalInfoRequest();
          }
        });
        return;
      }
      NShopListContentAgent.this.sendHospitalInfoRequest();
    }
 public void onMistakeRecieved(int paramInt, String paramString)
 {
   if ((SelectDishCartTogetherActivity.this.isResumed) && (!TextUtils.isEmpty(paramString)))
     Toast.makeText(SelectDishCartTogetherActivity.this, paramString, 0).show();
   if (paramInt == 100)
     SelectDishCartTogetherActivity.this.finish();
 }
Exemplo n.º 3
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);
 }
Exemplo n.º 4
0
 public void onRequestFinish(MApiRequest paramMApiRequest, MApiResponse paramMApiResponse)
 {
   if ((paramMApiResponse == null) || (paramMApiResponse.result() == null));
   do
   {
     do
       return;
     while (this.infoRequest != paramMApiRequest);
     paramMApiRequest = (DPObject)paramMApiResponse.result();
   }
   while ((paramMApiRequest == null) || (TextUtils.isEmpty(paramMApiRequest.getString("ConsultUrl"))));
   startActivity(paramMApiRequest.getString("ConsultUrl"));
 }
Exemplo n.º 5
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"));
     }
   });
 }
 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());
   }
 }
Exemplo n.º 7
0
 public void onAgentChanged(Bundle paramBundle)
 {
   super.onAgentChanged(paramBundle);
   NewShopListDataSource localNewShopListDataSource = (NewShopListDataSource)getDataSource();
   int i = 0;
   label119: String str;
   label159: label226: GAUserInfo localGAUserInfo;
   if (localNewShopListDataSource != null)
   {
     if (!TextUtils.isEmpty(localNewShopListDataSource.weddingBanquetTitle))
       i = 1;
   }
   else
   {
     if ((i == 0) || ((this.mBannerID != 0) && (this.mBannerID != i)))
     {
       if (this.fab != null)
         this.frameLayout.removeView(this.fab);
       this.fab = null;
       this.showWeddingFab = false;
     }
     this.mBannerID = i;
     if ((localNewShopListDataSource != null) && (this.mBannerID != 0))
     {
       if (this.fab == null)
       {
         if (this.mBannerID != 1)
           break label458;
         i = R.layout.search_hotel_shoplist;
         this.fab = ((NovaLinearLayout)LayoutInflater.from(getActivity()).inflate(i, null));
         if (this.mBannerID != 1)
           break label466;
         i = ViewUtils.dip2px(getActivity(), 75.0F);
         paramBundle = new FrameLayout.LayoutParams(-2, -2);
         paramBundle.setMargins(0, ViewUtils.dip2px(getActivity(), 350.0F), -i, 0);
         paramBundle.gravity = 5;
         this.fab.setLayoutParams(paramBundle);
         this.frameLayout.addView(this.fab);
       }
       if (this.mBannerID != 1)
         break label481;
       str = "wedding_quicksearch";
       localGAUserInfo = new GAUserInfo();
       localGAUserInfo.query_id = localNewShopListDataSource.queryId();
       paramBundle = localNewShopListDataSource.weddingBanquetTitle;
       if (this.mBannerID == 2)
       {
         paramBundle = localNewShopListDataSource.hospitalEntryTitle;
         if (localNewShopListDataSource.hospitalEntryTitle.length() > 2)
           paramBundle = new StringBuilder(localNewShopListDataSource.hospitalEntryTitle).insert(2, "\n").toString();
       }
       ((TextView)this.frameLayout.findViewById(R.id.name)).setText(paramBundle);
       this.fab.setGAString(str, localGAUserInfo);
       this.fab.setOnClickListener(this.mClickListener);
       if (!this.showWeddingFab)
       {
         this.showWeddingFab = true;
         if (this.mBannerID != 1)
           break label488;
       }
     }
   }
   label458: label466: label481: label488: for (i = ViewUtils.dip2px(getActivity(), 75.0F); ; i = ViewUtils.dip2px(getActivity(), 90.0F))
   {
     paramBundle = ObjectAnimator.ofFloat(this.fab, "translationX", new float[] { 0.0F, ViewUtils.dip2px(getActivity(), 25.0F) - i });
     paramBundle.setStartDelay(100L);
     paramBundle.setDuration(500L);
     paramBundle.start();
     GAHelper.instance().contextStatisticsEvent(getContext(), str, localGAUserInfo, "view");
     return;
     if (!TextUtils.isEmpty(localNewShopListDataSource.hospitalEntryTitle))
     {
       i = 2;
       break;
     }
     i = 0;
     break;
     i = R.layout.search_hospital_shoplist;
     break label119;
     i = ViewUtils.dip2px(getActivity(), 90.0F);
     break label159;
     str = "wenzhen";
     break label226;
   }
 }