@Override
  public void onClick(View view) {
    switch (view.getId()) {
      case R.id.headLayout:
        {
          Intent intent = new Intent(this, TenantPersonalVerifyActivity.class);
          this.startActivity(intent);
        }
        break;

      case R.id.topCardTextView:
        {
          Intent intent = new Intent(this, TenantCardSettingActivity.class);
          this.startActivity(intent);
        }
        break;

      case R.id.topRecordTextView:
        {
          Intent intent = new Intent(this, TenantLookListActivity.class);
          this.startActivityForResult(intent, 0);
        }
        break;

      case R.id.topSettingTextView:
        {
          Intent intent = new Intent(this, TenantSettingActivity.class);
          this.startActivity(intent);
        }
        break;

      case R.id.hqAccountLayout:
        { // 活期账户,昨日收益
          InvestmentActivity.setDefaultType(InvestmentActivity.TYPE_HQ);
          Intent intent = new Intent(this, InvestmentActivity.class);
          intent.putExtra("type", InvestmentActivity.TYPE_HQ);
          this.startActivity(intent);
        }
        break;

      case R.id.balanceLayout:
        { // 账户余额
          Intent intent = new Intent(this, WithdrawalsActivity.class);
          this.startActivity(intent);
        }
        break;

      case R.id.recordsLayout:
        { // 交易记录
          Intent intent = new Intent(this, TransferHistoryActivity.class);
          this.startActivity(intent);
        }
        break;

      case R.id.hqLayout:
        { // 活期代扣
          if (userDto == null) {
            this.requestUserHouse();
            return;
          }

          Intent intent = new Intent(this, HQReplacePayActivity.class);
          intent.putExtra("OPEN", userDto.isAutoPay());
          this.startActivity(intent);
        }
        break;

      case R.id.guguTextView:
        {
          Intent intent = new Intent(this, ShowWebViewActivity.class);
          intent.putExtra("title", "鼓鼓理财");
          intent.putExtra("url", "http://www.baggugu.com/app/about.html");
          startActivity(intent);
        }
        break;
    }
  }
  private void responseUserHouse() {
    headImageView.setImageURL(Constants.HOST_IP + userDto.getLogoUrl());
    if (StringUtils.isBlank(userDto.getLogoUrl())) {
      headImageView.setBorderWidth(0);
    } else {
      headImageView.setBorderWidth(2);
    }

    double totalEarnings = Double.parseDouble(userDto.getHqMoney());
    // 只有当数字大于0.10的时候,才会有涨动的动画,而且,如果小于0.10,金额会显示为0.00,且界面卡动。
    if (totalEarnings >= 0.10) {
      totalMoneyTextView.setValue(totalEarnings);
      magicScrollView.AddListener(totalMoneyTextView);
      mHandler.sendEmptyMessageDelayed(0, 100);
    } else {
      totalMoneyTextView.setText(userDto.getHqMoney());
    }

    totalMoneyTextView.setText(userDto.getHqMoney());
    yesterdayEarningsTextView.setText("昨日收益:" + userDto.getHqYesterday());
    moneyTextView.setText(userDto.getSurplusMoney());
    hqStatusTextView.setText(userDto.isAutoPay() ? "已开启" : "未开启");
    if (userDto.getReserveCount() > 0) {
      countBadgeView.setText(userDto.getReserveCount() + "");
      countBadgeView.show(true);
    } else {
      countBadgeView.hide(false);
    }

    if (userDto.getHouses().isEmpty()) {
      noHouseImageView.setVisibility(View.VISIBLE);
    } else {
      noHouseImageView.setVisibility(View.GONE);
    }

    contentLayout.removeAllViews();
    for (UserHouseListAppDto dto : userDto.getHouses()) {
      TenantMeLayout layout = new TenantMeLayout(this);
      layout.setData(dto);

      LinearLayout.LayoutParams params =
          new LinearLayout.LayoutParams(
              LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.WRAP_CONTENT);
      params.setMargins(0, 0, 0, AdapterUtil.dip2px(this, 20));
      contentLayout.addView(layout, params);
    }
  }