I tried using autoSizeTextType
.
My minSdk is 24, all the tools are 26 and compat ist 26-beta2 as well.
Making them adjustable was tried through code:
dialogWeight.touchables.filterIsInstance<Button>().forEach {
TextViewCompat.setAutoSizeTextTypeWithDefaults(it,
TextViewCompat.AUTO_SIZE_TEXT_TYPE_UNIFORM) }
And xml:
<android.support.v7.widget.AppCompatTextView
android:layout_height="match_parent"
android:text="7"
android:autoSizeTextType="uniform"/>
Any ideas ? I'm starting to believe that it's currently bugged
The key thing to understand is to use
app:autoSizeTextType
, as opposed toandroid:autoSizeTextType
Per the documentation:
I solved it programmatically.
and the XML:
Okay, so the combination of settings that worked :
You also need the appcompat-v7 library as a dependency in your module build.gradle file.