Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fc063e9c authored by Nader Jawad's avatar Nader Jawad
Browse files

Updated ColorDrawable setAlpha/getAlpha documentation

Updated documentation on ColorDrawable to clarify that the alpha
value provided is combined with the color's already existing alpha
value instead of overwriting it.

Bug: 119004459
Test: Build and boots
Change-Id: Id62462c4ac7d2f46cdc3236876f7e0711fbc4c16
parent 8ad9ef4a
Loading
Loading
Loading
Loading
+8 −2
Original line number Diff line number Diff line
@@ -149,9 +149,13 @@ public class ColorDrawable extends Drawable {
    }

    /**
     * Returns the alpha value of this drawable's color.
     * Returns the alpha value of this drawable's color. Note this may not be the same alpha value
     * provided in {@link Drawable#setAlpha(int)}. Instead this will return the alpha of the color
     * combined with the alpha provided by setAlpha
     *
     * @return A value between 0 and 255.
     *
     * @see ColorDrawable#setAlpha(int)
     */
    @Override
    public int getAlpha() {
@@ -159,7 +163,9 @@ public class ColorDrawable extends Drawable {
    }

    /**
     * Sets the color's alpha value.
     * Applies the given alpha to the underlying color. Note if the color already has
     * an alpha applied to it, this will apply this alpha to the existing value instead of
     * overwriting it.
     *
     * @param alpha The alpha value to set, between 0 and 255.
     */