summaryrefslogtreecommitdiff
path: root/docs/html
diff options
context:
space:
mode:
authorHemal Patel <hemalp@google.com>2016-11-07 23:03:25 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-11-07 23:03:25 +0000
commit2e594bcc746ad970bac106c66578853b4e699d26 (patch)
treee670a02a19c8bab8ca910b10e6d523278030cb57 /docs/html
parent6e5a8f714c07e227c90680dddbac4d205fe0952d (diff)
parent6a263b9faf200c51044fbaff0d20876fcf44f38b (diff)
Docs: Revised the Drawable example am: ad302b60f4 am: 32bda49ae3 am: 618d339f3c am: 972fed3d41 am: 3fb153b196
am: 6a263b9faf Change-Id: I9a246348630e85edeac441b310326f5c216585e9
Diffstat (limited to 'docs/html')
-rw-r--r--docs/html/guide/topics/resources/providing-resources.jd23
1 files changed, 14 insertions, 9 deletions
diff --git a/docs/html/guide/topics/resources/providing-resources.jd b/docs/html/guide/topics/resources/providing-resources.jd
index 80a989a57e28..99aeb4379eeb 100644
--- a/docs/html/guide/topics/resources/providing-resources.jd
+++ b/docs/html/guide/topics/resources/providing-resources.jd
@@ -905,20 +905,25 @@ PNG file and two small XML files that point to it. (An example XML file is shown
<h4>Drawable</h4>
-<p>To create an alias to an existing drawable, use the {@code <bitmap>} element.
-For example:</p>
+<p>
+ To create an alias to an existing drawable, use the {@code <drawable>}
+ element. For example:
+</p>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?>
-&lt;bitmap xmlns:android="http://schemas.android.com/apk/res/android"
- android:src="@drawable/icon_ca" />
+&lt;resources&gt;
+ &lt;drawable name="icon"&gt;&#64;drawable/icon_ca&lt;/drawable&gt;
+&lt;/resources&gt;
</pre>
-<p>If you save this file as {@code icon.xml} (in an alternative resource directory, such as
-{@code res/drawable-en-rCA/}), it is compiled into a resource that you
-can reference as {@code R.drawable.icon}, but is actually an alias for the {@code
-R.drawable.icon_ca} resource (which is saved in {@code res/drawable/}).</p>
-
+<p>
+ If you save this file as {@code drawables.xml} (in an alternative resource
+ directory, such as {@code res/values-en-rCA/}), it is compiled into a
+ resource that you can reference as {@code R.drawable.icon}, but is actually
+ an alias for the {@code R.drawable.icon_ca} resource (which is saved in
+ {@code res/drawable/}).
+</p>
<h4>Layout</h4>