java - Line Break Height in android -
java - Line Break Height in android -
now having code counts height , width of paragraph , sets accordingly. have been having unusual problems whenever break line(\n) passes through paragraph utilize code calculate height. calculate width , create sure line fit.
float textsize = t.gettextsize(); paint paint = new paint(); paint.settextsize(textsize);
however reason break line couldn't have height calculated mean me missing few lines or show me half line cause of break lines during performed calculations.
my question is, how undergo calculation of height of break line of space occupies?
i wasn't able solve issue. did seek delete 3 more characters @ border of end point of width. worked. real problem lies more in character width. if character not registered android calculation vs actual out come can different if have letters different off regular alphabet.
using code can determine border of endpoint.
totalcurrentwidth = t.getpaint().measuretext(s.substring(start, end));
however characters not registered in scheme may have different end or no end @ all(chinese or taiwan example).
during each individual characters used in verdana produces different spacing compared actual outcome of text.
if find wrong logic sense free comment me. strive improve after all.
java android textview
Comments
Post a Comment