title: jelly bean vs ice cream sandwich textview appearance error
body: <p>I have implemented a button that changes the typeface, textsize, and padding of a textview. The textview starts off with StyleA, then the button switches it to StyleB and it looks fine, then pressing the button again switches it back to StyleA and the padding is no longer correct in Android Ice Cream Sandwich, but looks fine for Jelly Bean (tested with 4.1.1 device and emulator and 4.2.2 emulator). It has something to do with setting for StyleB</p>
  
  <pre><code>  int appearanceB = android.R.style.TextAppearance_Medium;
    myTextView.setTextAppearance(getApplicationContext(), appearanceB);
  </code></pre>
  
  <p>and for StyleA:</p>
  
  <pre><code>  int appearanceA = R.style.my_style;
    myTextView.setTextAppearance(getApplicationContext(), appearanceA);
  </code></pre>
  
  <p>If I comment out the switch to android.R.style.TextAppearance_Medium, everything works fine in ICS (4.0.3 emulators and 4.0.4 physical device). What I am finding is that setting StyleB somehow causes the padding to be messed up when switching back to StyleA, however, when I don't set android.R.style.TextAppearance_Medium for StyleB, then the padding does not get messed up. Again, the error only happens with Android 4.0 and not 4.1 or 4.2.</p>
  
  <p>Any thoughts?</p>