title: how to underline text within a button using a style
body: <p>Is there a way to underline the text in a Button using a style?
  I can do it by wrapping the text in <code>strings.xml</code> with html tags like this</p>
  
  <pre><code>&lt;string name="my_text"&gt;&lt;u&gt;My underlined text&lt;/u&gt;&lt;/string&gt;
  </code></pre>
  
  <p>But I rather have it like this</p>
  
  <pre><code>&lt;com.google.android.material.button.MaterialButton
      style="@style/Widget.MaterialComponents.Button.TextButton"
      android:id="@+id/my_button"
      android:layout_width="0dp"
      android:layout_height="wrap_content"
      app:layout_constraintStart_toStartOf="parent"
      app:layout_constraintEnd_toEndOf="parent"
      app:layout_constraintBottom_toBottomOf="parent"
      &lt;!-- not working --&gt; android:textStyle="underline"
      android:text="@string/my_text" /&gt;
  </code></pre>
  
  <p>and ideally I would define the style in <code>styles.xml</code></p>
  
  <pre><code>&lt;style name="MyButton" parent="Widget.MaterialComponents.Button.TextButton"&gt;
      &lt;!-- not working --&gt;&lt;item name="android:textStyle"&gt;underline&lt;/item&gt;
  &lt;/style&gt;
  </code></pre>
  
  <p>And I know I could probably make my own custom Button that will have the text underlined. But that feels like it would take a lot of effort for something so basic.</p>
  
  <p><strong>Edit</strong>
  My question was marked as possible duplicate for <a href="https://stackoverflow.com/questions/31718707/how-to-underline-text-of-button-in-android">this question</a>, but I'm trying to achieve underlining via styling. </p>