title: Xamarin Android change global button style
body: <p>I have an app from a college where I need to change the color of all Buttons when they are focused (on the vuzix m300 smartglass (4.2)). Focused and unfocused buttons are barely distinguishable. </p>
  
  <p>So how can I just change the color of a focused Button, while leaving everything else intact? </p>
  
  <p>Basically, I want to override the global settings of Buttons without having to go into each layout and having to add styles.</p>
  
  <p>Edit:
  A have a selector defined in my <code>button_style.xml</code> inside my drawable folder but in order to apply it I would have to change each axml file manually.</p>
  
  <p>drawable\button_style.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;selector xmlns:android="http://schemas.android.com/apk/res/android"&gt;
    &lt;item android:state_focused="true" &gt;
      &lt;shape&gt;
        &lt;solid
            android:color="#77faff" /&gt;
        &lt;stroke
            android:width="1dp"
            android:color="#444444" /&gt;
        &lt;corners
            android:radius="6dp" /&gt;
        &lt;padding
            android:left="10dp"
            android:top="10dp"
            android:right="10dp"
            android:bottom="10dp" /&gt;
      &lt;/shape&gt;
    &lt;/item&gt;
  &lt;/selector&gt;
  </code></pre>
  
  <p>values\styles.xml:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8" ?&gt;
  &lt;resources&gt;
    &lt;style name="button_style" parent="android:style/Widget.Button"&gt;&lt;/style&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>But this would only apply to a button once I add
  "style="@style/button_style" to it. I want to auto apply it to every Button in my app.</p>