Note that there are some explanatory texts on larger screens.

plurals
  1. POAndroid theme not being set
    text
    copied!<p>I have a theme that refuses to be applied to activities - none of the styles are applied. If I don't supply the <code>layout_width</code>/<code>layout_height</code> attributes for <code>&lt;Button&gt;</code> it also gets a runtime error, showing that the <code>Button</code> class isn't being applied.</p> <p><strong>/res/values/themes.xml</strong>:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;style name="Theme" parent="android:style/Theme.Black"&gt; &lt;item name="android:windowNoTitle"&gt;true&lt;/item&gt; &lt;item name="android:buttonStyle"&gt;@style/Button&lt;/item&gt; &lt;item name="android:windowBackground"&gt;@color/page_background_light&lt;/item&gt; &lt;item name="android:textAppearance"&gt;@style/TextAppearance&lt;/item&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre> <p><strong>/res/values/styles.xml</strong>:</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;resources&gt; &lt;style name="TextAppearance" parent="@android:style/TextAppearance"&gt; &lt;item name="android:textSize"&gt;12sp&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/darkblue&lt;/item&gt; &lt;/style&gt; &lt;style name="Button" parent="@android:style/Widget.Button"&gt; &lt;item name="android:layout_width"&gt;fill_parent&lt;/item&gt; &lt;item name="android:layout_height"&gt;wrap_content&lt;/item&gt; &lt;!--&lt;item name="android:textColor"&gt;#3C2F4F&lt;/item&gt; &lt;item name="android:textSize"&gt;20dip&lt;/item&gt;--&gt; &lt;/style&gt; &lt;/resources&gt; </code></pre> <p>and the relevant <strong>manifest setting</strong>:</p> <pre><code>&lt;application android:icon="@drawable/icon" android:label="@string/app_name" android:theme="@style/Theme"&gt; </code></pre> <p>What's the obvious mistake I'm missing?</p>
 

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