How to set style for spinner programmatically?
<p>I have spinner with a style selection (I set the spinner style in <code>strings.xml</code>) and it's works well if I set the style in <code>main.xml</code>. But I want to know how to set the style programmatically in which the style already defined in <code>strings.xml</code>.</p>

<p>Refer my code below</p>

<p><strong>main.xml:</strong></p>

<pre><code>      &lt;Spinner
         android:id="@+id/PassengersSpinner1"
         android:layout_width="100dp"
         android:layout_height="40dp"
         android:layout_span="3"
         android:layout_marginTop="6dp" 
         style="@style/SpinnerStyle" /&gt;
</code></pre>

<p><strong>strings.xml:</strong></p>

<pre><code> &lt;style
    name="SpinnerStyle" 
    parent="@android:style/Widget.Spinner"&gt;     
    &lt;item name="android:background"&gt;@android:drawable/btn_default&lt;/item&gt;            
 &lt;/style&gt;
</code></pre>

<p>Now, I want to know that how can I set this <code>strings.xml</code> programmatically without <code>main.xml</code>?</p>
