code: public void setPadding(Rect padding) {
          if (padding == null) {
              mState.mPadding = null;
          } else {
              if (mState.mPadding == null) {
                  mState.mPadding = new Rect();
              }
              mState.mPadding.set(padding);
          }
          invalidateSelf();
      }
docs: Sets padding for this shape, defined by a Rect object. Define the padding
  in the Rect object as: left, top, right, bottom.