title: Centered Image in a TextView
body: <p>I want to create a TextView with some images in the middle of the block of text. I accomplished this by using </p>
  
  <pre><code>Html.fromHtml(String source, Html.ImageGetter imageGetter, Html.TagHandler tagHandler)
  </code></pre>
  
  <p>and using my own overidden <code>getDrawable()</code> method:</p>
  
  <pre><code>@Override
  public Drawable getDrawable(String source){
       int id;
       if (source.equals("image.png")) {
           id = R.drawable.ic_launcher;
       } else {
           return null;
       }
       LevelListDrawable d = new LevelListDrawable();
       Drawable empty = getResources()
               .getDrawable(id);
       d.addLevel(0, 0, empty);
       d.setBounds(0, 0,
               empty.getIntrinsicWidth(),
               empty.getIntrinsicHeight());
       return d;
  }
  </code></pre>
  
  <p>to replace <code>&lt;img&gt;</code> tags. However, the bottom edge of the images I load are always aligned with the bottom of the text like so: </p>
  
  <p><img src="https://i.stack.imgur.com/UOpxv.png" alt="enter image description here"></p>
  
  <p><strong>My question is: is there a way to vertically center these images?</strong></p>
  
  <p>The HTML source I used is: </p>
  
  <pre><code>title = Html.fromHtml("&lt;img src=\"image.png\" align=\"middle\"/&gt;", this, null);
  desc = Html.fromHtml("Text &lt;img src=\"image.png\" align=\"middle\"/&gt; "
                  + "text &lt;img src=\"image.png\" align=\"middle\"/&gt; blah blah blah blah blah&lt;br&gt;"
                  + "Blah &lt;img src=\"image.png\" align=\"middle\"/&gt; blah blah", this, null);
  </code></pre>