title: How to create custom ToggleButton style in Android?
body: <p>I am wanting to create a custom <code>ToggleButton</code> style, mainly so I can change the minimum height and text size depending on the screen size.</p>
  
  <p>I have already done this for <code>Button</code>:</p>
  
  <p><strong>styles.xml</strong></p>
  
  <pre><code>&lt;style name="AppTheme" parent="Theme.AppCompat.NoActionBar"&gt;
      &lt;item name="buttonStyle"&gt;@style/MyButtonStyle&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="MyButtonStyle" parent="Widget.AppCompat.Button"&gt;
      &lt;item name="android:minHeight"&gt;@dimen/button_min_height&lt;/item&gt;
      &lt;item name="android:textSize"&gt;@dimen/button_text_size&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>And I am now wanting to do a similar thing for <code>ToggleButton</code>. I have tried this...</p>
  
  <pre><code>&lt;style name="AppTheme" parent="Theme.AppCompat.NoActionBar"&gt;
      &lt;item name="buttonStyle"&gt;@style/MyButtonStyle&lt;/item&gt;
      &lt;item name="android:buttonStyleToggle"&gt;@style/MyToggleButtonStyle&lt;/item&gt;
  &lt;/style&gt;
  
  &lt;style name="MyToggleButtonStyle" parent="Widget.AppCompat.ToggleButton"&gt;
      &lt;item name="android:minHeight"&gt;@dimen/button_min_height&lt;/item&gt;
      &lt;item name="android:textSize"&gt;@dimen/button_text_size&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>...but <code>Widget.AppCompat.ToggleButton</code> doesn't exist. So what changes do I need to make so I can control the minimum height and text size of my <code>ToggleButton</code>s like I already do for <code>Button</code>s?</p>
  
  <p>I would prefer an approach similar to the above, not only for consistency but so I don't have to go through all my layout files and update the <code>ToggleButton</code>s' xml individually.</p>