code: private static Shader createLinearGradient(@NonNull final Orientation orientation,
                                                 final int bitmapWidth, final int bitmapHeight,
                                                 final float shadowWidth,
                                                 @ColorInt final int shadowColor) {
          RectF bounds = new RectF();
  
          switch (orientation) {
              case LEFT:
                  bounds.left = bitmapWidth;
                  bounds.right = bitmapWidth - shadowWidth;
                  break;
              case TOP:
                  bounds.top = bitmapHeight;
                  bounds.bottom = bitmapHeight - shadowWidth;
                  break;
              case RIGHT:
                  bounds.right = shadowWidth;
                  break;
              case BOTTOM:
                  bounds.bottom = shadowWidth;
                  break;
              default:
                  throw new IllegalArgumentException("Invalid orientation: " + orientation);
          }
  
          return new LinearGradient(bounds.left, bounds.top, bounds.right, bounds.bottom, shadowColor,
                  Color.TRANSPARENT, Shader.TileMode.CLAMP);
      }
docs: Creates and returns a shader, which can be used to draw a shadow, which located besides an
  edge of an elevated view.
  
  @param orientation
  The orientation of the shadow in relation to the elevated view as a value of the enum
  {@link Orientation}. The orientation may either be <code>LEFT</code>,
  <code>TOP</code>, <code>RIGHT</code> or <code>BOTTOM</code>
  @param bitmapWidth
  The width of the bitmap, which is used to draw the shadow, in pixels as an {@link
  Integer} value
  @param bitmapHeight
  The height of the bitmap, which is used to draw the shadow, in pixels as an {@link
  Integer} value
  @param shadowWidth
  The width of the shadow in pixels as a {@link Float} value
  @param shadowColor
  The color of the shadow as an {@link Integer} value
  @return The shader, which has been created as an instance of the class {@link Shader}