TextView autoSizeTextType not working in Compat

前端 未结 4 703
一整个雨季
一整个雨季 2021-01-11 12:26

I tried using autoSizeTextType. My minSdk is 24, all the tools are 26 and compat ist 26-beta2 as well.

4条回答
  •  北恋
    北恋 (楼主)
    2021-01-11 13:10

    I solved it programmatically.

    TextView number1 = findViewById(R.id.number_one);
    TextViewCompat.setAutoSizeTextTypeWithDefaults(number1, TextViewCompat.AUTO_SIZE_TEXT_TYPE_UNIFORM);
    

    and the XML:

      
    

提交回复
热议问题