private void responseReserve() {
    this.applyLookTextView.setEnabled(false);

    if (lookCountBadgeView.isShown()) {
      lookCountBadgeView.increment(1);
    } else {
      lookCountBadgeView.setText((appDto.getReserveCount() + 1) + "");
      lookCountBadgeView.show();
    }
  }
  private void initHead() {
    View v = mInflater.inflate(R.layout.fragment_message_user_list_head, null, false);

    v.findViewById(R.id.atLayout)
        .setOnClickListener(
            new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                Intent intent = new Intent(getActivity(), NotifyListActivity_.class);
                intent.putExtra("type", 0);
                startActivity(intent);

                postNetwork(HOST_MARK_AT, new RequestParams(), HOST_MARK_AT);
              }
            });

    v.findViewById(R.id.commentLayout)
        .setOnClickListener(
            new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                Intent intent = new Intent(getActivity(), NotifyListActivity_.class);
                intent.putExtra("type", 1);
                startActivity(intent);

                postNetwork(HOST_MARK_COMMENT, new RequestParams(), HOST_MARK_COMMENT);
              }
            });

    v.findViewById(R.id.systemLayout)
        .setOnClickListener(
            new View.OnClickListener() {
              @Override
              public void onClick(View v) {
                Intent intent = new Intent(getActivity(), NotifyListActivity_.class);
                intent.putExtra("type", 4);
                startActivity(intent);

                postNetwork(HOST_MARK_SYSTEM, new RequestParams(), HOST_MARK_SYSTEM);
              }
            });

    badgeAt = (BadgeView) v.findViewById(R.id.badgeAt);
    badgeAt.setVisibility(View.INVISIBLE);
    badgeComment = (BadgeView) v.findViewById(R.id.badgeComment);
    badgeComment.setVisibility(View.INVISIBLE);
    badgeSystem = (BadgeView) v.findViewById(R.id.badgeSystem);
    badgeSystem.setVisibility(View.INVISIBLE);

    listView.addHeaderView(v);
  }
  private void initView() {
    headLayout = (LinearLayout) this.findViewById(R.id.headLayout);
    headLayout.setOnClickListener(this);

    headImageView = (CircleImageView) this.findViewById(R.id.headImageView);

    topCardTextView = (TextView) this.findViewById(R.id.topCardTextView);
    topCardTextView.setOnClickListener(this);

    topRecordTextView = (TextView) this.findViewById(R.id.topRecordTextView);
    topRecordTextView.setOnClickListener(this);

    countBadgeView = new BadgeView(this, topRecordTextView);
    countBadgeView.setBadgePosition(BadgeView.POSITION_TOP_RIGHT);
    countBadgeView.setBadgeMargin(AdapterUtil.dip2px(this, 15), AdapterUtil.dip2px(this, 5));
    countBadgeView.setTextSize(13);
    countBadgeView.hide();

    topSettingTextView = (TextView) this.findViewById(R.id.topSettingTextView);
    topSettingTextView.setOnClickListener(this);

    hqAccountLayout = (LinearLayout) this.findViewById(R.id.hqAccountLayout);
    hqAccountLayout.setOnClickListener(this);

    totalMoneyTextView = (MagicTextView) this.findViewById(R.id.totalMoneyTextView);
    totalMoneyTextView.setLargeFontSize(35);
    totalMoneyTextView.setSmallFontSize(35);
    totalMoneyTextView.setValue(0.00);

    magicScrollView = (MagicScrollView) this.findViewById(R.id.magicScrollView);

    yesterdayEarningsTextView = (TextView) this.findViewById(R.id.yesterdayEarningsTextView);

    guguTextView = (TextView) this.findViewById(R.id.guguTextView);
    guguTextView.setText(
        Html.fromHtml("<font color=#23AFF5>鼓鼓理财,</font><font color=#333333>为您创造10%的活期理财收益</font>"));
    guguTextView.setOnClickListener(this);

    moneyTextView = (TextView) this.findViewById(R.id.moneyTextView);
    hqStatusTextView = (TextView) this.findViewById(R.id.hqStatusTextView);

    this.findViewById(R.id.balanceLayout).setOnClickListener(this);
    this.findViewById(R.id.recordsLayout).setOnClickListener(this);
    this.findViewById(R.id.hqLayout).setOnClickListener(this);

    noHouseImageView = (ImageView) this.findViewById(R.id.noHouseImageView);
    contentLayout = (LinearLayout) this.findViewById(R.id.contentLayout);
  }
  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);
    }
  }
  private void responseHouseInfo() {
    if (!appDto.getTags().isEmpty()) {
      flowlayout.setVisibility(View.VISIBLE);

      flowlayout.setAdapter(
          new TagAdapter<String>(appDto.getTags()) {
            @Override
            public View getView(FlowLayout parent, int position, String s) {
              TextView tv =
                  (TextView)
                      LayoutInflater.from(KeeperHouseInfoPublishActivity.this)
                          .inflate(R.layout.tag_layout, parent, false);
              tv.setText(s);
              return tv;
            }
          });
    }

    imageURLList = appDto.getTopImages();
    initViewPager();
    viewPagerAdapter.notifyDataSetChanged();

    viewPager.setFocusable(true);
    viewPager.setFocusableInTouchMode(true);
    viewPager.requestFocus();

    this.communityTextView.setText(appDto.getCommunity() + "   " + appDto.getHouseType());
    this.areaTextView.setText(appDto.getAreaStr());
    this.moneyTextView.setText(appDto.getMonthMoney());
    this.monthTextView.setText("元/月");

    this.leaseTypeTextView.setText(
        Html.fromHtml(
            "<font color=#999999>类型:</font><font color=#222222>"
                + appDto.getLeaseType()
                + "</font>"));
    this.decorateTextView.setText(
        Html.fromHtml(
            "<font color=#999999>装修:</font><font color=#222222>"
                + appDto.getDecorate()
                + "</font>"));
    this.areaSizeTextView.setText(
        Html.fromHtml(
            "<font color=#999999>面积:</font><font color=#222222>" + appDto.getSize() + "</font>"));
    this.orientationTextView.setText(
        Html.fromHtml(
            "<font color=#999999>朝向:</font><font color=#222222>"
                + appDto.getOrientation()
                + "</font>"));
    this.floorTextView.setText(
        Html.fromHtml(
            "<font color=#999999>楼层:</font><font color=#222222>" + appDto.getFloor() + "</font>"));
    this.leaseTimeTextView.setText(appDto.getLeaseTimeStr());

    this.adapter.setData(appDto.getEquipments(), false);

    this.heatingFeesTextView.setText(appDto.isHeatingFees() ? "租户交" : "房东交");

    this.busTextView.setText(
        Html.fromHtml(
            "<font color=#999999>公交:</font><font color=#222222>" + appDto.getBus() + "</font>"));
    this.subwayTextView.setText(
        Html.fromHtml(
            "<font color=#999999>地铁:</font><font color=#222222>" + appDto.getSubway() + "</font>"));

    this.applyLookTextView.setEnabled(appDto.isAdd());

    if (appDto.getReserveCount() == 0) {
      lookCountBadgeView.hide();

    } else {
      lookCountBadgeView.setText(appDto.getReserveCount() + "");
      lookCountBadgeView.show(true);
    }
  }
  private void initView() {
    this.findViewById(R.id.backBtn).setOnClickListener(this);
    ((TextView) this.findViewById(R.id.titleTextView)).setText("房屋信息");

    flowlayout = (TagFlowLayout) this.findViewById(R.id.flowlayout);
    flowlayout.setEnabled(false);
    flowlayout.setVisibility(View.GONE);

    this.communityTextView = (TextView) this.findViewById(R.id.communityTextView);
    this.areaTextView = (TextView) this.findViewById(R.id.areaTextView);
    this.moneyTextView = (TextView) this.findViewById(R.id.moneyTextView);
    this.monthTextView = (TextView) this.findViewById(R.id.monthTextView);
    this.leaseTypeTextView = (TextView) this.findViewById(R.id.leaseTypeTextView);
    this.decorateTextView = (TextView) this.findViewById(R.id.decorateTextView);
    this.areaSizeTextView = (TextView) this.findViewById(R.id.areaSizeTextView);
    this.orientationTextView = (TextView) this.findViewById(R.id.orientationTextView);
    this.floorTextView = (TextView) this.findViewById(R.id.floorTextView);
    this.leaseTimeTextView = (TextView) this.findViewById(R.id.leaseTimeTextView);

    gridView = (AsymmetricGridView) this.findViewById(R.id.gridView);

    gridView.setRequestedColumnCount(3);
    gridView.setRowHeight(45);
    gridView.determineColumns();
    gridView.setAllowReordering(true);
    gridView.isAllowReordering(); // true

    adapter = new EquipmentAdapter(this);
    AsymmetricGridViewAdapter asymmetricAdapter =
        new AsymmetricGridViewAdapter<>(this, gridView, adapter);
    gridView.setAdapter(asymmetricAdapter);

    heatingFeesTextView = (TextView) this.findViewById(R.id.heatingFeesTextView);
    busTextView = (TextView) this.findViewById(R.id.busTextView);
    subwayTextView = (TextView) this.findViewById(R.id.subwayTextView);

    houseCertLayout = (LinearLayout) this.findViewById(R.id.houseCertLayout);
    houseCertLayout.setOnClickListener(this);

    cancelPublishTextView = (TextView) this.findViewById(R.id.cancelPublishTextView);
    cancelPublishTextView.setOnClickListener(this);

    lookatLayout = (LinearLayout) this.findViewById(R.id.lookatLayout);

    lookListTextView = (TextView) this.findViewById(R.id.lookListTextView);
    lookListTextView.setOnClickListener(this);

    lookCountBadgeView = new BadgeView(this, lookListTextView);
    lookCountBadgeView.setBadgePosition(BadgeView.POSITION_TOP_RIGHT);

    applyLookTextView = (TextView) this.findViewById(R.id.applyLookTextView);
    applyLookTextView.setOnClickListener(this);

    cancelPublishTextView.setVisibility(View.GONE);
    lookatLayout.setVisibility(View.VISIBLE);

    if (this.getIntent().getBooleanExtra("hideall", false)) {
      cancelPublishTextView.setVisibility(View.GONE);
      lookatLayout.setVisibility(View.GONE);
    }
  }