Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Looking at the <a href="http://paste.pound-python.org/show/26125/" rel="nofollow">pastie you linked in the comment</a> I think you need to remove the <code>&lt;?xml version="1.0" encoding="utf-8"?&gt;</code> line at the start. Eclipse won't build a freshly created app with that xml root in a layout..</p> <p>Although that's strange as the first two examples I've found on the Android Developer site (<a href="http://developer.android.com/guide/topics/resources/layout-resource.html" rel="nofollow">for example</a>) include it</p> <p>I'd be interested to see what happens if you remove that line...</p> <hr> <p>In Eclipse if I use </p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="#E8E8E8" &gt; </code></pre> <p>then the background colour changes.</p> <p>If I change that to</p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@string/background_grey" &gt; </code></pre> <p>by adding <code>&lt;string name="background_grey"&gt;#E8E8E8&lt;/string&gt;</code> to /res/values/strings.xml the background changes.</p> <p>This also works if I declare it as <code>android:background="@color/background_grey"</code> in the layout and <code>&lt;color name="background_grey"&gt;#E8E8E8&lt;/color&gt;</code> in strings.xml</p> <p>and if I setup res/values/colors.xml &lt;= I've used colors.xml (while you've used color.xml) however <a href="http://developer.android.com/guide/topics/resources/more-resources.html" rel="nofollow">http://developer.android.com/guide/topics/resources/more-resources.html</a> tells us the filename is arbitrary as you can see by the declaration working in the strings.xml file</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;color name="background_grey"&gt;#E8E8E8&lt;/color&gt; &lt;/resources&gt; </code></pre> <p>and declare the layout as </p> <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@color/background_grey" &gt; </code></pre> <p>then the background also changes...</p> <p>If it doesn't behave the same for you then there's something funky going on or you're using a different layout than the simple example above and, well, there's something funky going on in that layout.</p>
    singulars
    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.
    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