Solution 1 :
You can use AbsoluteSizeSpan for your
SpannableStringBuilder yourText = new SpannableStringBuilder("5.00 USD"); span.setSpan(new AbsoluteSizeSpan(fontsize, true), start, end,Spannable.SPAN_EXCLUSIVE_EXCLUSIVE); yourTextView.setText(span)
You can find more information from developer webpage
Solution 2 :
Check the font face that it zeros are smaller that the rest of the digit and apply it.
I need to show the price in the Android app. Design is such that text size of two digits after the decimal point is smaller than the rest of the text. I know I can achieve this with multiple
TextView views but I’m wondering if anyone did it without the use of multiple views and how to do it.
TL;DR Price should be formatted like this: 5,oo USD (oo in this example represents two zeros as in zero cents with text size smaller than the number 5 which represents the number of dollars)
Comment posted by Umair
have you tried using
Comment posted by stackoverflow.com/questions/16335178/…