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

Commit b97d6985 authored by Alan Viverette's avatar Alan Viverette
Browse files

API for tinting TextView compound drawables

BUG: 18762354
Change-Id: Iba6fab4f63a5d26cb27606d25a1fd0a1f47afa57
parent 095e9cf9
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -502,6 +502,8 @@ package android {
    field public static final int drawablePadding = 16843121; // 0x1010171
    field public static final int drawableRight = 16843120; // 0x1010170
    field public static final int drawableStart = 16843666; // 0x1010392
    field public static final int drawableTint = 16843990; // 0x10104d6
    field public static final int drawableTintMode = 16843991; // 0x10104d7
    field public static final int drawableTop = 16843117; // 0x101016d
    field public static final int drawingCacheQuality = 16842984; // 0x10100e8
    field public static final int dropDownAnchor = 16843363; // 0x1010263
@@ -39008,6 +39010,8 @@ package android.widget {
    method public boolean extractText(android.view.inputmethod.ExtractedTextRequest, android.view.inputmethod.ExtractedText);
    method public final int getAutoLinkMask();
    method public int getCompoundDrawablePadding();
    method public android.content.res.ColorStateList getCompoundDrawableTintList();
    method public android.graphics.PorterDuff.Mode getCompoundDrawableTintMode();
    method public android.graphics.drawable.Drawable[] getCompoundDrawables();
    method public android.graphics.drawable.Drawable[] getCompoundDrawablesRelative();
    method public int getCompoundPaddingBottom();
@@ -39107,6 +39111,8 @@ package android.widget {
    method public void setAllCaps(boolean);
    method public final void setAutoLinkMask(int);
    method public void setCompoundDrawablePadding(int);
    method public void setCompoundDrawableTintList(android.content.res.ColorStateList);
    method public void setCompoundDrawableTintMode(android.graphics.PorterDuff.Mode);
    method public void setCompoundDrawables(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
    method public void setCompoundDrawablesRelative(android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable, android.graphics.drawable.Drawable);
    method public void setCompoundDrawablesRelativeWithIntrinsicBounds(int, int, int, int);
+265 −150

File changed.

Preview size limit exceeded, changes collapsed.

+22 −0
Original line number Diff line number Diff line
@@ -4163,6 +4163,28 @@
        <attr name="drawableEnd" format="reference|color" />
        <!-- The padding between the drawables and the text. -->
        <attr name="drawablePadding" format="dimension" />
        <!-- Tint to apply to the compound (left, top, etc.) drawables. -->
        <attr name="drawableTint" format="color" />
        <!-- Blending mode used to apply the compound (left, top, etc.) drawables tint. -->
        <attr name="drawableTintMode">
            <!-- The tint is drawn on top of the drawable.
                 [Sa + (1 - Sa)*Da, Rc = Sc + (1 - Sa)*Dc] -->
            <enum name="src_over" value="3" />
            <!-- The tint is masked by the alpha channel of the drawable. The drawable’s
                 color channels are thrown out. [Sa * Da, Sc * Da] -->
            <enum name="src_in" value="5" />
            <!-- The tint is drawn above the drawable, but with the drawable’s alpha
                 channel masking the result. [Da, Sc * Da + (1 - Sa) * Dc] -->
            <enum name="src_atop" value="9" />
            <!-- Multiplies the color and alpha channels of the drawable with those of
                 the tint. [Sa * Da, Sc * Dc] -->
            <enum name="multiply" value="14" />
            <!-- [Sa + Da - Sa * Da, Sc + Dc - Sc * Dc] -->
            <enum name="screen" value="15" />
            <!-- Combines the tint and drawable color and alpha channels, clamping the
                 result to valid color values. Saturate(S + D) -->
            <enum name="add" value="16" />
        </attr>
        <!-- Extra spacing between lines of text. -->
        <attr name="lineSpacingExtra" format="dimension" />
        <!-- Extra spacing between lines of text, as a multiplier. -->
+2 −0
Original line number Diff line number Diff line
@@ -2594,6 +2594,8 @@
    <public type="attr" name="dialogPreferredPadding" id="0x010104d3" />
    <public type="attr" name="searchHintIcon" id="0x010104d4" />
    <public type="attr" name="revisionCode" />
    <public type="attr" name="drawableTint" />
    <public type="attr" name="drawableTintMode" />

    <public type="style" name="Theme.DeviceDefault.Dialog.Alert" />
    <public type="style" name="Theme.DeviceDefault.Light.Dialog.Alert" />