code: private void setShadowInternal(float radius,
                                     @ColorInt int color,
                                     boolean invalidate) {
          mShadowRadius = radius;
          mShadowColor = color;
  
          // Reset previous shadow layer
          mBorderPaint.clearShadowLayer();
          mCheckedBackgroundPaint.clearShadowLayer();
  
          if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
              setLayerType(LAYER_TYPE_SOFTWARE, mBorderPaint);
              setLayerType(LAYER_TYPE_SOFTWARE, mCheckedBackgroundPaint);
          }
  
          mBorderPaint.setShadowLayer(
                  mShadowRadius,
                  0.0f,
                  mShadowRadius / 2,
                  mShadowColor);
  
          if (mAllowCheckStateShadow) {
              mCheckedBackgroundPaint.setShadowLayer(
                      mShadowRadius,
                      0.0f,
                      mShadowRadius / 2,
                      mShadowColor);
          }
  
          // Invalidate the view if asked
          if (invalidate) {
              invalidate();
          }
      }
docs: Set shadow layers
  
  @param radius
  @param color
  @param invalidate