It is sometimes desirable to set the same textSize for several auto-sized TextViews. For example, the "units" TextViews beside the "number input" EditTexts.
However, currently the auto-sizing in Android doesn't seem to have provided this functionality. So it's likely that we should write some function(s) to do this programmatically.
And the first step is to get actual textSize of an auto-sized TextView.
I tried:
val view = findViewById<TextView>(R.id.textView)
Toast.makeText(this, "text size is ${view.textSize}", Toast.LENGTH_LONG).show()
and changed to several locales on a phone.
The text size DID change for different locales, but the toasted message showed the same size (56.0).
How to get the actual textSize of an auto-sized TextView, in Kotlin?