Closed miladrasooli closed 10 years ago
The fix should be quite easy. All you have to is basically instead of drawing at horizontalOffset
, you draw the text at width - horizontalOffset - wordLength - (and couple other margin offsets)
. I think should be able to fix this without having to mess with the code too much.
PS. I don't have a unit I can test my code on, so I really can't say too much. However, I can confirm that you modifications should not have to go outside of TextViewEx.java
.
If you do get it to work, please do push the code, so that others can use it as well.
Hi, Thank you for your advice... I changed some lines of code and now it is working (only) for RTL languages. https://github.com/miladrasooli/TextJustify-Android/commit/255d500d89e188f090e5c4ffb739952d2e89553e
You should try this: https://github.com/Saleh-Hassan/RTL-TextJustify-Android
Just do a pull request and I will merge with the updated code that I will push tomorrow night.
Hi, I want to use your code for my app that is in Persian language, But when it draws text all the words are in reversed form.I think it is RTL problem that is not considered in the code. Thanks