Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e594bcc authored by Hemal Patel's avatar Hemal Patel Committed by android-build-merger
Browse files

Docs: Revised the Drawable example am: ad302b60 am: 32bda49a am:...

Docs: Revised the Drawable example am: ad302b60 am: 32bda49a am: 618d339f am: 972fed3d am: 3fb153b1
am: 6a263b9f

Change-Id: I9a246348630e85edeac441b310326f5c216585e9
parents 6e5a8f71 6a263b9f
Loading
Loading
Loading
Loading
+14 −9
Original line number Original line Diff line number Diff line
@@ -905,20 +905,25 @@ PNG file and two small XML files that point to it. (An example XML file is shown


<h4>Drawable</h4>
<h4>Drawable</h4>


<p>To create an alias to an existing drawable, use the {@code <bitmap>} element.
<p>
For example:</p>
  To create an alias to an existing drawable, use the {@code <drawable>}
  element. For example:
</p>


<pre>
<pre>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;?xml version="1.0" encoding="utf-8"?>
&lt;bitmap xmlns:android="http://schemas.android.com/apk/res/android"
&lt;resources&gt;
    android:src="@drawable/icon_ca" />
    &lt;drawable name="icon"&gt;&#64;drawable/icon_ca&lt;/drawable&gt;
&lt;/resources&gt;
</pre>
</pre>


<p>If you save this file as {@code icon.xml} (in an alternative resource directory, such as
<p>
{@code res/drawable-en-rCA/}), it is compiled into a resource that you
  If you save this file as {@code drawables.xml} (in an alternative resource
can reference as {@code R.drawable.icon}, but is actually an alias for the {@code
  directory, such as {@code res/values-en-rCA/}), it is compiled into a
R.drawable.icon_ca} resource (which is saved in {@code res/drawable/}).</p>
  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>
<h4>Layout</h4>