Android how to make button text bold when pressed or focussed
<p>I want to change the text inside a button to be bold when the button is highlighted or pressed. I currently use a xml file to define the button and use the XML to change how it looks when pressed but I would like to do this without using an image.</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"
          android:state_pressed="false" 
          android:drawable="@drawable/reset_hover" /&gt;
    &lt;item android:state_focused="true" 
          android:state_pressed="true"
          android:drawable="@drawable/reset_hover" /&gt;
    &lt;item android:state_focused="false" 
          android:state_pressed="true"
      android:drawable="@drawable/reset_hover" /&gt;
    &lt;item android:drawable="@drawable/reset" /&gt;
&lt;/selector&gt;
</code></pre>

<p>I tried using something like the following,  but it doesn't seem to ever get called.</p>

<pre><code>    final Button btn_reset = (Button) findViewById(R.id.btn_reset);
    btn_reset.setOnClickListener(this); 
    btn_reset.setOn(new OnFocusChangeListener() {
    @Override
    public void onFocusChange(View v, boolean hasFocus) {
        if (hasFocus){btn_reset.setTypeface(null, Typeface.BOLD);}
        else{btn_reset.setTypeface(null, Typeface.NORMAL);}
    }
   });
</code></pre>
