title: Is it possible to position drawable of TextView to center
body: <p>I was wondering, how can I position drawable for my <code>TextView</code> to center?</p>
  
  <pre><code>textView.setCompoundDrawablesWithIntrinsicBounds(R.drawable.bomb, 0, 0, 0);
  </code></pre>
  
  <p>The drawable always position to the left. (There is no text)</p>
  
  <p>Even I had specified</p>
  
  <pre><code>android:layout_gravity="center"
  android:gravity="center"
  </code></pre>
  
  <p>But the above gravity parameter only workable for text, not the drawable.</p>
  
  <p>I prefer not to use <code>ImageView</code>, as sometimes I do need to display text.</p>
  
  <p>According to <a href="https://stackoverflow.com/questions/8238043/positioning-a-compounddrawable-within-textview">positioning a compoundDrawable within TextView?</a>, they use a hard coded padding value to shift the left drawable toward left.</p>
  
  <p>Is there a better way, to position it to exactly center?</p>