Search code examples
androidrich-text-editorimagespan

Android - how to set a large bitmap to ImageSpan?


I try to set a large bitmap(720*18463) to ImageSpan, but it didn't appear, and the problem is :

W/OpenGLRenderer: Bitmap too large to be uploaded into a texture (720x18463, max=4096x4096)

How to deal with it ?

(Addtional, I want to make a RichText Editor, which can add image around text.)


Solution

  • Scale your Bitmap when decode, and wrap it with a BitmapDrawable if you want to control the bounds.