Is it possible to set TextView
's text size to be the same as TextView
height, when TextView height isn't predefined(WRAP_CONTENT
or FILL_PARENT
)?
Asked
Active
Viewed 719 times
1

Community
- 1
- 1

amukhachov
- 5,822
- 1
- 41
- 60
-
You mean stretching characters and show them inside TextView? why exactly you want to do this? motivation factor? – TeaCupApp Jun 03 '11 at 16:24
-
I've got TextView with some text which should take all remaining space of screen – amukhachov Jun 03 '11 at 16:39
-
could you please post your layout xml where textview is residing, thnks – TeaCupApp Jun 03 '11 at 16:44
-
http://stackoverflow.com/questions/5033012/auto-scale-textview-text-to-fit-within-bounds – amukhachov Jan 22 '14 at 12:41
2 Answers
0
I've found the library that do exactly what I want : SizeAdjustingTextView

amukhachov
- 5,822
- 1
- 41
- 60
0
i also wanted to do something like this and the closest you can seem to get is to say android:textSize=20dp
(or whatever size you think is appropriate) for either your style or each element that is displaying text. since dp
is device independent pixels, if it appears to be taking up the whole screen on your device, then it is supposed to appear that way on all other devices too. you might want to check on this as you might have to choose a different dp value for each of the different size/density combinations possible (depending on what kind of devices you are aimed at, also whether you are allowing the use to change the orientation) this has all that info.

dylan murphy
- 1,370
- 1
- 18
- 33