code: @Override protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
      if (isInEditMode())
        super.onLayout(changed, left, top, right, bottom);
      else if (isDragViewAtTop()) {
        dragView.layout(left, top, right, transformer.getOriginalHeight());
        secondView.layout(left, transformer.getOriginalHeight(), right, bottom);
        ViewHelper.setY(dragView, top);
        ViewHelper.setY(secondView, transformer.getOriginalHeight());
      } else {
        secondView.layout(left, transformer.getOriginalHeight(), right, bottom);
      }
    }
docs: Override method to configure the dragged view and secondView layout properly.