Files
rk35xx-android14/development/samples/browseable/DrawableTinting/_index.jd
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

18 lines
813 B
Plaintext

page.tags="DrawableTinting"
sample.group=UI
@jd:body
<p>
Sample that shows applying tinting and color filters to Drawables both programmatically
and as Drawable resources in XML.
\n\nTinting is set on a nine-patch drawable through the "tint" and "tintMode" parameters.
A color state list is referenced as the tint color, which defines colors for different
states of a View (for example disabled/enabled, focused, pressed or selected).
\n\nProgrammatically, tinting is applied to a Drawable through its "setColorFilter" method,
with a reference to a color and a PorterDuff blend mode. The color and blend mode can be
changed from the UI to see the effect of different options.
</p>