0

I have two textviews, a title and a subtitle, just like:

enter image description here

As strings are located on strings.xml, they might change their width depending on the language, it can be larger or shorter.

Doubt: Is there a way I can keep subtitle's TextView2 both left and right edges always aligned to the Title's textView edges, no matter what? I imagine android would have to adjust the font size automatically to match both edges.

Is this possible?

AndroidDev
  • 831
  • 5
  • 17
  • 36
  • There is no "fit width" for font size. There are some libraries and / or code snippets that help do that, but if your text gets much longer in other languages that might not be the best idea – David Medenjak Feb 13 '16 at 15:55

1 Answers1

0

You need to write your own implementation to handle this case. Please check this link which got more info and a solution.

Auto-fit TextView for Android

Community
  • 1
  • 1
Guru_VL
  • 402
  • 3
  • 6