mathew-kurian / TextJustify-Android

:page_facing_up: Android Text Full Jusiftication / Wrapping / Justify / Hyphenate - V2.0
https://github.com/bluejamesbond/TextJustify-Android/wiki
Apache License 2.0
1.86k stars 369 forks source link

Last Line size get truncated #6

Closed Suresh1988 closed 10 years ago

Suresh1988 commented 10 years ago

Hi,

Thanks for the wonderful library. I am using your library to justify the textview. Everything works perfect except the last line of the paragraph.. The last line characters are getting truncated ... Please help me to solve the issue.

mathew-kurian commented 10 years ago

No problem! Can you do two things and I can help you fix it?

  1. What font size are you using?
  2. What Option/method are you using from the library?
yvonne3 commented 10 years ago

Hi bluejamesbond, Thanks for your wonderful guide and when I tried the Option 1, I got an error on my MainActivity.java -"textViewEx cannot be resolved or is not a field", even I tried many times cleaning the project or restarting Eclipse. Please advice am I missing any steps? Appreciate for prompt reply.

mathew-kurian commented 10 years ago

I am not what is going wrong, why don't you send me the project via email.

DeveloperBeginner commented 10 years ago

I too am facing the same problem of last line characters getting truncated. I am using a font size of 16 sp and using draw based setup from the library to get the text justified.

mathew-kurian commented 10 years ago

I haven't had much time to work on this but a temporary fix is changing this value:

Line 85: verticalOffset = horizontalFontOffset = getLineHeight() - 0.5f; // Temp fix

Change the 0.5f or the line-height to something that fits your needs.