Exemplo n.º 1
0
  @Override
  protected TitleParams getTitleParams() {
    String title = "";
    if (mMarket != null) {
      title = mMarket.getShow_name();
    }
    Action action =
        new ActionImpl() {
          @Override
          public void doAction(View v) {
            showContactsPopup(mMarket.getId(), mCustomTitle);
          }

          @Override
          public View getView() {
            mTitleRightIv = new ImageView(FreightMarketDetailActivity.this);
            if (ContactsDao.getInstance().queryById(mMarket.getId()) == null) {
              mTitleRightIv.setImageResource(R.drawable.chatroom_contacts_option_not_contacts);
            } else {
              mTitleRightIv.setImageResource(R.drawable.chatroom_contacts_option_is_contacts);
            }
            return mTitleRightIv;
          }
        };
    return new TitleParams(getDefaultHomeAction(), title).setAction(action).setShowLogo(false);
  }
Exemplo n.º 2
0
  @Override
  protected void onContactsOption(String option) {
    //        showPendingDialog(null);
    if (ContactsUtils.STR_COMPLAIN.equals(option)) {
      //        	ToastUtils.showToast(option);
      if (mMarket != null) {
        Intent intent =
            new Intent(FreightMarketDetailActivity.this, CustomerComplaintActivity.class);
        intent.putExtra("user", mMarket);
        startActivity(intent);
      } else {
        Toast.makeText(getApplicationContext(), "投诉", Toast.LENGTH_SHORT).show(); // 投诉
      }

    } else {
      ContactsUtils.onContactsOption(option, mMarket.getId(), this);
    }
  }