5

I have a Text View (without a Scroll view) Inside of a Frame Layout.

The problem is that the text view shows the Text properly till it reaches the Frame Layouts size limits. What i wish to do is to Reduce the Size of the Fonts in the TextView whenever the FrameLayouts Size is Reached, so that the text can be viewed fully , as currently the text is cut after the Framelayouts size is reached.

Any inputs are welcome.

Some one Some where
  • 777
  • 1
  • 8
  • 26
  • 1
    check this out http://stackoverflow.com/questions/9498762/dynamically-adding-views-to-horizontal-linearlayout-goes-out-of-the-screen – Nishant Mar 07 '12 at 05:07

2 Answers2

5

If I understand you correctly, you want to shrink the text. This has been asked many times on Stack Overflow

Here are two examples of programatically shrinking the text to fit:

http://jeffreysambells.com/posts/2010/04/04/android-textview-with-auto-sized-content/

http://catchthecows.com/?p=72

Mo Kargas
  • 1,000
  • 7
  • 24
3

You can use android:autoSizeTextType in API level 26. See https://stackoverflow.com/a/46798283/1162784 for more.

arsent
  • 6,975
  • 3
  • 32
  • 31