I had a good search for this here and cannot find a solution.
I have a TextView in a RelativeLayout that contains an integer. The number will range from 1 to 99 - can someone tell me how the size of the TextView is so that its width is always the width of the string "99", even if it contains only "1"?
I need this because the position of the components to the right of this TextView depends on its width, so all positions depend on how many digits are contained in the TextView.
I don't mind if it's done in XML or code - I just want to avoid setting the width of the TextView in pixels!
Thanks for any possible solutions; Please ask if I have missed any important information!
android text rendering
If This Is Art Jul 06 '10 at 17:35 2010-07-06 17:35
source share