/**
  * Close the custom view applying an animation to close the view to the left side of the screen.
  */
 public void closeToLeft() {
   if (viewDragHelper.smoothSlideViewTo(
       dragView,
       -transformer.getOriginalWidth(),
       getHeight() - transformer.getMinHeightPlusMargin())) {
     ViewCompat.postInvalidateOnAnimation(this);
     notifyCloseToLeftListener();
   }
 }
 public int getDraggedViewHeightPlusMarginTop() {
   return transformer.getMinHeightPlusMargin();
 }
 /**
  * Calculate the vertical drag range between the custom view and dragged view.
  *
  * @return the difference between the custom view height and the dragged view height.
  */
 private float getVerticalDragRange() {
   return getHeight() - transformer.getMinHeightPlusMargin();
 }