Android - displaying fractions using unicode

前端 未结 1 1796
萌比男神i
萌比男神i 2021-01-16 03:41

I am trying to make a fraction:

I am using this is a text view but it is not rendering very nicely:

\"5\"+\'\\u2044\'+\"9\";

It do

1条回答
  •  终归单人心
    2021-01-16 04:13

    Try:

    tv.setText(Html.fromHtml("5/9"));
    

    Don't know if that will look good, but it's worth a shot. Otherwise, other than the single-glyph fractions like 1/2, I suspect you either will need to go without or render it yourself.

    0 讨论(0)
提交回复
热议问题