java - TextView Span with custom content -


i want create span can modify content. so, example need draw text without first 3 , last 4 characters. i'm trying use replacable span:

class italicreplacement extends replacementspan {  @override public int getsize(paint paint, charsequence text, int start, int end, paint.fontmetricsint fm) {     paint.settextskewx(-0.25f);     return (int) paint.measuretext(text, start + 3, end - 4); }  @override public void draw(canvas canvas, charsequence text, int start, int end, float x, int top, int y, int bottom, paint paint) {     paint.settextskewx(-0.25f);      canvas.drawtext(text, start + 3, end - 4, x, y, paint); } } 

but replacable span draws image. not text. so, can't work regular text. , main problem wrapping (http://i.stack.imgur.com/lxjuj.png).

i saw this , this. there same problems.

so, there other way want? example, want clickable spoilers or urls displays domain. may other *span can that?


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -