android ImageSpan, in textview when last position show a big image is little,but my image is very big,I want to the ImageSpan auto next line . I try overload size method and change size equal textview width, but doesn't solve the problem
SpanabeleString contentSS=new SpanabeleString("hello word on the line [image]");
contentSS.setSpan(imageSpan,"[image]".start,"start".length,xxx);
//imageSpan not support auto new line;
I cannot change content,I hope use imagespan implement auto next line function
An ImageSpan is an indirect subclass of ReplacementSpan. Flowing onto a new line is, evidently, something that
ReplacementSpan(therefore an ImageSpan) cannot do. Here is a quote from an article Drawing a rounded corner background on text by Florina Muntenescu who blogs about spans and the like. (Emphasis in the following quote is mine.)I think that this is the flowing issue that you are having. As a work-around, you can insert the newline yourself when the condition occurs. There is no way that I know of to tell the ImageSpan to wrap.