title: Append image to TextView
body: <p>I've tried for two day now to append an image to a TextView, but it didn't work. I have tried this for Android 6/API Level 23. ImageSpan, Html.fromHtml and other Methods did not work. So is it possible to append image (Bitmap) between other words in a TextView on Android 6?</p>
  
  <hr>
  
  <blockquote>
    <p>EDIT</p>
  </blockquote>
  
  <hr>
  
  <p>Here is the XML:</p>
  
  <pre><code>&lt;TextView
              android:layout_height="wrap_content"
              android:textAppearance="?android:attr/textAppearanceMedium"
              android:layout_width="match_parent"
              android:text="------"
              android:gravity="bottom|left"
              android:typeface="monospace"
              android:id="@+id/mainTextView1"
              android:textIsSelectable="true"/&gt;
  </code></pre>
  
  <p>And image span Code:</p>
  
  <pre><code>SpannableStringBuilder ssb = new SpannableStringBuilder(mOutEditText.getText()); ssb.setSpan(new ImageSpan(bitmapArray.get(0), ImageSpan.ALIGN_BASELINE), cursorPosition, cursorPosition+2, Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); mOutEditText.setText(ssb, BufferType.SPANNABLE);
  </code></pre>