diff options
author | Alan Viverette <alanv@google.com> | 2014-09-22 16:19:51 -0700 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2014-09-22 16:19:51 -0700 |
commit | fde4e3b17a5ead9f1a0848bf35b4f49f16600795 (patch) | |
tree | f6116b710128ac60646319cb154fac8c4e1a8c31 /core/java/android/content/res | |
parent | e35c9bf9ba0cb4438dfd001055fc6cd5c2d0a575 (diff) | |
download | frameworks_base-fde4e3b17a5ead9f1a0848bf35b4f49f16600795.zip frameworks_base-fde4e3b17a5ead9f1a0848bf35b4f49f16600795.tar.gz frameworks_base-fde4e3b17a5ead9f1a0848bf35b4f49f16600795.tar.bz2 |
Fix inaccurate TypedArray.getDrawable() documentation
The documentation implied that you could override
Resources.getDrawable(int) to load custom drawables, which is
not the case.
BUG: 16635905
Change-Id: I06c0febe2d6d4194ef5a31f167b378fe311b7a2d
Diffstat (limited to 'core/java/android/content/res')
-rw-r--r-- | core/java/android/content/res/TypedArray.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/core/java/android/content/res/TypedArray.java b/core/java/android/content/res/TypedArray.java index 186623a..73b93c6 100644 --- a/core/java/android/content/res/TypedArray.java +++ b/core/java/android/content/res/TypedArray.java @@ -16,6 +16,7 @@ package android.content.res; +import android.annotation.Nullable; import android.graphics.drawable.Drawable; import android.util.AttributeSet; import android.util.DisplayMetrics; @@ -728,15 +729,13 @@ public class TypedArray { } /** - * Retrieve the Drawable for the attribute at <var>index</var>. This - * gets the resource ID of the selected attribute, and uses - * {@link Resources#getDrawable Resources.getDrawable} of the owning - * Resources object to retrieve its Drawable. + * Retrieve the Drawable for the attribute at <var>index</var>. * * @param index Index of attribute to retrieve. * * @return Drawable for the attribute, or null if not defined. */ + @Nullable public Drawable getDrawable(int index) { if (mRecycled) { throw new RuntimeException("Cannot make calls to a recycled instance!"); |