public void squish()

in app/src/main/java/com/google/reviewit/widget/ScrollWithHeadingsView.java [502:532]


    public void squish(int heightToSquish) {
      super.squish(heightToSquish);

      float paddingSquish = heightToSquish / 2;
      if (paddingSquish > headingPaddingMax / 3) {
        if (detailsTopView != null) {
          detailsTopView.setAlpha(0f);
        }
        if (detailsBottomView != null) {
          detailsBottomView.setAlpha(0f);
        }
      } else if (paddingSquish > 0) {
        float alpha = 1 - paddingSquish / (headingPaddingMax / 3);
        if (detailsTopView != null) {
          detailsTopView.setAlpha(alpha);
        }
        if (detailsBottomView != null) {
          detailsBottomView.setAlpha(alpha);
        }
      } else {
        if (detailsTopView != null) {
          detailsTopView.setAlpha(1f);
        }
        if (detailsBottomView != null) {
          detailsBottomView.setAlpha(1f);
        }
      }

      layout.getLayoutParams().height = height - heightToSquish;

    }