title: Android: Button state changed event
body: <p>Some XML attributes of buttons (such as background, textColor, etc) can be defined with color or drawable state List like this:</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_pressed="true"
            android:color="#ffff0000"/&gt; 
      &lt;item android:state_focused="true"
            android:color="#ff0000ff"/&gt; 
      &lt;item android:state_enabled="true"
            android:color="#ff00ffff"/&gt; 
      &lt;item android:color="#ff000000"/&gt; 
  &lt;/selector&gt;
  </code></pre>
  
  <p>When view state changes (pressed/unpressed, for example), corresponding color is changed automatically. </p>
  
  <p>How can I prograqmmatically handle some kind of stateChangedEvent to perform more complicated layout change, than just changing a color (for example, change font size or set another text)?</p>