Merge "Fix bad workaround docs in Resources.getDrawable()" into nyc-dev

am: 16aaa3e

* commit '16aaa3e5355a8a7213bb4cce8383108b9430e3e2':
  Fix bad workaround docs in Resources.getDrawable()

Change-Id: Id40f9e082b21be5d550661a39c0bf826b03159aa
This commit is contained in:
Alan Viverette
2016-04-05 14:20:10 +00:00
committed by android-build-merger

View File

@@ -714,12 +714,11 @@ public class Resources {
* the resource ID passed here is an alias to another Drawable resource.
* This means that if the density configuration of the alias resource
* is different than the actual resource, the density of the returned
* Drawable would be incorrect, resulting in bad scaling. To work
* around this, you can instead retrieve the Drawable through
* {@link TypedArray#getDrawable TypedArray.getDrawable}. Use
* {@link android.content.Context#obtainStyledAttributes(int[])
* Context.obtainStyledAttributes} with
* an array containing the resource ID of interest to create the TypedArray.</p>
* Drawable would be incorrect, resulting in bad scaling. To work
* around this, you can instead manually resolve the aliased reference
* by using {@link #getValue(int, TypedValue, boolean)} and passing
* {@code true} for {@code resolveRefs}. The resulting
* {@link TypedValue#resourceId} value may be passed to this method.</p>
*
* <p class="note"><strong>Note:</strong> To obtain a themed drawable, use
* {@link android.content.Context#getDrawable(int) Context.getDrawable(int)}