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 370 forks source link

support spanable justify textview for RTL ( Right To Left ) langueges #89

Open HamidrezaAmz opened 9 years ago

HamidrezaAmz commented 9 years ago

hi I read some issues about supporting right to left languages, but there is some thing wrong! I think you are not familiar with these languages I'll give you an example . Our text is "چطوری.......سلام......." so the RTL languages should be some thing like this:
"........سلام.......چطوری" but in this library we will have some thing like this: ".......مالس......یروطچ" this can not be a big problem, just a little correction need to improve this library. can you update it? thanks

mathew-kurian commented 9 years ago

@HamidrezaAmz You can just flip your words when you input it (workaround).

HamidrezaAmz commented 9 years ago

If you mean reversing my words, I do, all lines are OK except last line, it is reverse! check these screen shots, and it is not fully justified

screenshot_2015-08-04-15-22-11

this is what it should be:

screenshot_2015-08-04-14-45-11

theBlbDan commented 9 years ago

Does the view not support xml android:textDirection @bluejamesbond Saying to me, do 'xyz', though a solution, is not the best, nor correct solution. The view should either understand existing RTL's or be allowed to be instructed via attributes. I shouldn't have to mechanically flip my words around.

HamidrezaAmz commented 9 years ago

@theBlbDan do you have any solution for this condition?

mathew-kurian commented 9 years ago

@theBlbDan Offering a mere workaround. I don't have time to issue a fix. However, I will welcome a PR.

theBlbDan commented 9 years ago

@bluejamesbond Quite understandable. I'll see what I can discover, since this is an important issue for me as well.

HamidrezaAmz commented 9 years ago

@theBlbDan , @bluejamesbond last line do not need to be justified, and because I revers the main string last line is reverse, where did you check that the text-view riches last line?

pouyadarabi commented 9 years ago

I have same problem! any help will be appreciated! Thanks

saeedjassani commented 7 years ago

@HamidrezaAmz can you help me with #126 ? I think it's similar

lomza commented 7 years ago

Why is this bug closed? Is there any solution? I'm experiencing the same problem with English justified text - last line contains only one word, but it's still justified, making four letters display in one line. Tested on Android 6.0.1, Nexus 5.

HamidrezaAmz commented 7 years ago

@saeedjassani this library is not helpful for RTL languages, google more you can find some ;)

mathew-kurian commented 7 years ago

@gkrishnan please review. Let's fix this

saeedjassani commented 7 years ago

@bluejamesbond the problem is that, while justifying a paragraph, the last line is justified even if it only one word. refer #126 #127

Edonfreiner commented 7 years ago

Is there any fix for this?