Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It looks like you're trying to override the system theme to show a different color which is the right path to be on. Your spinner xml contains a reference to <code>android:theme</code> I haven't see that one before and it doesn't appear to be part of the API for this widget. To get your DropdownStyle to work, first, add it as part of your OverallStyle style with an item name of <code>@android:attr/spinnerDropDownItemStyle</code>. Second, change DropdownStyle's parent to <code>@android:Widget.DropDownItem.Spinner</code>. I'm assuming that OverallStyle is applied to the Activity or Application in the Manifest already. This will change the style for all Spinner drop down Items. </p> <p>To apply only to this view's drop down items do only step two above then add <code>style="@style/OverallStyle"</code> to the spinner in its layout.</p> <p>Additional Information:</p> <pre><code>&lt;style name="DropdownStyle" parent="@android:Widget.DropDownItem.Spinner"&gt; &lt;item name="android:textColor"&gt;@color/red&lt;/item&gt; &lt;/style&gt; &lt;style name="OverallStyle" parent="@android:Theme.Light"&gt; &lt;item name="android:windowBackground"&gt;@drawable/bg&lt;/item&gt; &lt;item name="@android:attr/spinnerDropDownItemStyle"&gt;@style/DropdownStyle&lt;/item&gt; &lt;item name="android:textColor"&gt;@color/white&lt;/item&gt; &lt;/style&gt; </code></pre> <p><strong>-OR-</strong></p> <p>themes.xml</p> <pre><code>&lt;style name="DropdownStyle" parent="@android:Widget.DropDownItem.Spinner"&gt; &lt;item name="android:textColor"&gt;@color/red&lt;/item&gt; &lt;/style&gt; </code></pre> <p>spinner.xml</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"&gt; &lt;Spinner android:id="@+id/spinner" android:layout_width="fill_parent" android:layout_height="wrap_content" android:prompt="@string/cat_prompt" style="@style/DropdownStyle" /&gt; &lt;/LinearLayout&gt; </code></pre>
    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