Better docs for ImageView legacy tint

Bug: 30283225
Change-Id: Ic748c2cc341edf44aed0202aa55a57584bd928c1
This commit is contained in:
Alan Viverette
2016-07-21 16:25:13 -04:00
parent 761d89ef4e
commit 2b4e14cfcc
2 changed files with 11 additions and 1 deletions

View File

@@ -545,6 +545,13 @@ public class ImageView extends View {
* Subsequent calls to {@link #setImageDrawable(Drawable)} will automatically
* mutate the drawable and apply the specified tint and tint mode using
* {@link Drawable#setTintList(ColorStateList)}.
* <p>
* <em>Note:</em> The default tint mode used by this setter is NOT
* consistent with the default tint mode used by the
* {@link android.R.styleable#ImageView_tint android:tint}
* attribute. If the {@code android:tint} attribute is specified, the
* default tint mode will be set to {@link PorterDuff.Mode#SRC_ATOP} to
* ensure consistency with earlier versions of the platform.
*
* @param tint the tint to apply, may be {@code null} to clear tint
*

View File

@@ -3790,7 +3790,10 @@ i
<!-- An optional argument to supply a maximum height for this view.
See {see android.widget.ImageView#setMaxHeight} for details. -->
<attr name="maxHeight" format="dimension" />
<!-- Set a tinting color for the image. By default, the tint will blend using SRC_ATOP mode. -->
<!-- The tinting color for the image. By default, the tint will blend using SRC_ATOP mode.
Please note that for compatibility reasons, this is NOT consistent with the default
SRC_IN tint mode used by {@link android.widget.ImageView#setImageTintList} and by
similar tint attributes on other views. -->
<attr name="tint" format="color" />
<!-- If true, the image view will be baseline aligned with based on its
bottom edge. -->