code: private static int getShadowAlpha(final int elevation, final int minTransparency,
                                        final int maxTransparency) {
          float ratio = (float) elevation / (float) MAX_ELEVATION;
          int range = maxTransparency - minTransparency;
          return Math.round(minTransparency + ratio * range);
      }
docs: Returns the alpha value of a shadow by interpolating between a minimum and maximum alpha
  value, depending on a specific elevation.
  
  @param elevation
  The elevation, which should be emulated, in dp as an {@link Integer} value. The
  elevation must be at least 0 and at maximum the value of the constant
  <code>MAX_ELEVATION</code>
  @param minTransparency
  The minimum alpha value, which should be used, if the given elevation is 0, as an
  {@link Integer} value between 0 and 255
  @param maxTransparency
  The maximum alpha value, which should be used, if the given elevation is
  <code>MAX_ELEVATION</code>, as an {@link Integer} value between 0 and 255
  @return The alpha value of the shadow as an {@link Integer} value between 0 and 255