Ellipsis text that is mixed RTL words but LTR price

37 Views Asked by At

I have RTL text that I want to ellipsis at the end (left), and works fine as long as the portion where it needs to truncate contains semitic (Arabic or Hebrew) letters. When it needs to truncate in the middle of a price, which is LTR ,the 3 dots appear on the right side. I have tried to force all kinds of rules but not getting results.

Ok: ...₪13.99

OK: ...מחיר ל100

NOT OK: ₪19... (because there is a dot following and Android thinks it's a new word?)

NOT OK: 16...) מארז של 3 יחידות

I tries all different combinations of LineBreak strategy, strictness, and wordBreak. None seem to make a difference. The Row is already set to RTL

Text(
       text = product.pricePerUnit,
       style = TextStyle(
             lineBreak = LineBreak(
                    strategy = LineBreak.Strategy.HighQuality,
                    strictness = LineBreak.Strictness.Strict,
                    wordBreak = LineBreak.WordBreak.Default
               )
       ),
       maxLines = 1,
       textAlign = TextAlign.Right,
       overflow = TextOverflow.Ellipsis
    )
0

There are 0 best solutions below