1

enter image description here

Hot to write this type of fraction Value in java or android code as shown above ? Any idea/suggestion will be appreciated.

Android Killer
  • 18,174
  • 13
  • 67
  • 90

2 Answers2

1

Do you mean how to display it? Unicode provides fractions up to eighths (used in finance) http://tlt.its.psu.edu/suggestions/international/bylanguage/mathchart.html

On the other hand, if your output can render HTML, you can combine "sup" and "sub" tags

1 <sup><font size=-2>11</font></sup>/<sub><font size=-2>16</font></sub> 

1 11/16

0

My idea would be to create a sublcass the relativelayout and add 3 textviews for each number and the '/' as an image.

Another method would be to create a custom view and use the canvas to the draw the fraction.

blessanm86
  • 31,439
  • 14
  • 68
  • 79