Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat is the different between the folder "drawable" and the file "drawable.xml"?
    primarykey
    data
    text
    <p>In the activity_main.xml, there are two rows code <code>android:background="@drawable/border_ui"</code> and <code>android:background="@drawable/my",</code> </p> <p>but the one use the border_ui.xml located the folder res\drawable, and the other use the file drawable.xml located the folder res\values. </p> <p>What different? Thanks! </p> <p>And more, an error will occur if I remove the file drawable.xml to the folder res\drawable and rename it as my.xml.</p> <p>activity_main.xml</p> <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="match_parent" android:paddingBottom="@dimen/activity_vertical_margin" android:paddingLeft="@dimen/activity_horizontal_margin" android:paddingRight="@dimen/activity_horizontal_margin" android:paddingTop="@dimen/activity_vertical_margin" tools:context=".MainActivity" android:background="@drawable/border_ui" &gt; &lt;TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/hello_world" android:background="@drawable/my" /&gt; &lt;/RelativeLayout&gt; </code></pre> <p>border_ui.xml</p> <pre><code>&lt;shape xmlns:android="http://schemas.android.com/apk/res/android" &gt; &lt;stroke android:width="1dp" android:color="#000000" /&gt; &lt;solid android:color="#ffffff" /&gt; &lt;padding android:bottom="1dp" android:left="1dp" android:right="1dp" android:top="1dp" /&gt; &lt;/shape&gt; </code></pre> <p>drawable.xml</p> <pre><code>&lt;resources&gt; &lt;drawable name="my"&gt;#f00&lt;/drawable&gt; &lt;/resources&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload