How to set drawable icon with text in the center of AppCompatButton
<p>As the title, I want to create a <code>AppCompatButton</code> with icon and text in the center. I used this method but it's not work:</p>

<pre><code>Spannable buttonLabel = new SpannableString(" Button Text");
buttonLabel.setSpan(new ImageSpan(getApplicationContext(), R.drawable.icon,      
ImageSpan.ALIGN_BOTTOM), 0, 1, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE);
button.setText(buttonLabel);
</code></pre>

<p>I also disabled <code>setTextAllCap</code> in the <code>xml</code> layout but nothing changed. Please help me to solve this solution.</p>