code: private void setTopMargin(final int margin) {
          FrameLayout.LayoutParams layoutParams = (FrameLayout.LayoutParams) getLayoutParams();
          layoutParams.topMargin = margin;
          setLayoutParams(layoutParams);
      }
docs: Set the top margin of the view.
  
  @param margin
  The top margin, which should be set, in pixels as an {@link Integer} value