code: private void setBorderInternal(int rawSize,
                                     @ColorInt int color,
                                     boolean invalidate) {
          mBorderWidth = rawSize;
          mBorderColor = color;
  
          if (null == mBorderPaint) {
              mBorderPaint = new Paint();
              mBorderPaint.setAntiAlias(true);
              mBorderPaint.setStyle(Paint.Style.FILL);
          }
  
          if (null != mBorderPaint) {
              mBorderPaint.setColor(mBorderColor);
              mBorderPaint.setStrokeWidth(Math.max(0, mBorderWidth)); // in pixels
          }
  
          // Invalidate the view if asked
          if (invalidate) {
              invalidate();
          }
      }
docs: Sets the border paint (and configs).
  
  @param rawSize
  @param color
  @param invalidate