title: SpannableString on button not works for API21?
body: <p>I try to put an icon on the toggle button by using SpannableString. and working on API17 but not on API21.</p>
  
  <p><img src="https://i.stack.imgur.com/99aY7.png" alt="spanable string on button and text"></p>
  
  <p>As you can see, It's work on Button and TextView for API17 but work on TextView only on API21 (The 'Z' is not replace by icon).</p>
  
  <pre><code>private SpannableStringBuilder createSpanIcon(int rid, String name){
      Drawable d = getActivity().getResources().getDrawable(rid);
      d.setBounds(0,0,20,20);
      ImageSpan imageSpan = new ImageSpan(d, DynamicDrawableSpan.ALIGN_BASELINE);
      SpannableStringBuilder builder = new SpannableStringBuilder();
  
          builder.append("Z\n")
                 .append(name)
                 .setSpan(imageSpan, 0, 1, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
  
          /* This give same result    
          builder.append("Z", imageSpan, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
                 .append("RED", new ForegroundColorSpan(Color.RED), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE)
                 .append("\n" + name);
          */
  
          return builder;
  }
  </code></pre>
  
  <p>and</p>
  
  <pre><code>    Button btn = (Button)v.findViewById(R.id.myButton);
      SpannableStringBuilder _test = createSpanIcon(R.drawable.tc_g, "Click Me!" );
      btn.setText( _test );
  
      TextView txt = (TextView)v.findViewById(R.id.myText);
      SpannableStringBuilder _test2 = createSpanIcon(R.drawable.tc_g, "I'm text" );
      txt.setText( _test2 );
  </code></pre>
  
  <p>Note: I dont want to use <code>setCompoundDrawablesWithIntrinsicBounds</code>, be cause I'm gonna put the icons on <code>ToggleButton</code> so <code>setTextOn</code> and <code>setTextOff</code> will swap icons for me.</p>
  
  <p>Anyone have an Idea why? and any work around?</p>