I
I
IDOL12342013-11-16 23:00:50
Android
IDOL1234, 2013-11-16 23:00:50

Is it possible to set the size of a TextView in characters?

I need to display a ListView whose elements are LinearLayouts with several nested objects, the first of which is a textView with a string whose maximum length does not exceed 12 characters. Is it possible to align listview lengths from different rows to the size that the maximum length row will take?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Artem Zinnatullin, 2013-11-17
@IDOL1234

Yes, you can, the TextView has the "ems" property, respectively, you can specify minEms="12" and maxEms="12" and the width of the TextView will be 12 characters, regardless of the number of characters in it

S
svd71_1, 2013-11-17
@svd71_1

No. Main reason: character size depends on font size. And all other dimensions are calculated using ordinary mathematics.
PS: I wrote nonsense. Artem_zin is right. Here is the description .

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question