替代android的字体大小:attr/textAppearanceSmall

替代android的字体大小:attr/textAppearanceSmall,android,android-theme,Android,Android Theme,在我的应用程序中,我经常使用?android:attr/textpearancesmall和?android:attr/textpearancemedium。我知道android:attr/textAppearanceSmall默认为font size14sp和?android:attr/textAppearanceMedium默认为font size18sp 现在,我们的测试团队希望的字体大小为16sp。有没有一种方法,我们可以覆盖这些值,这样我就不必逐个屏幕和逐行访问来替换它们。如果有人在处

在我的应用程序中,我经常使用
?android:attr/textpearancesmall
?android:attr/textpearancemedium
。我知道android:attr/textAppearanceSmall默认为
font size
14sp
?android:attr/textAppearanceMedium
默认为
font size
18sp


现在,我们的测试团队希望
字体大小为
16sp
。有没有一种方法,我们可以覆盖这些值,这样我就不必逐个屏幕和逐行访问来替换它们。

如果有人在处理类似的问题,我刚刚找到了答案

我在我的
AppTheme

<item name="android:textAppearanceSmall">@style/AppTheme.TextAppearance.Small</item>

谢谢

作为旁注,我还必须对父级进行不同的设置,以使其正常工作。我使用了:并从自定义主题引用了它:@style/TextAppearance.Large
<style name="AppTheme.TextAppearance.Small" parent="TextAppearance.AppCompat.Small">
    <item name="android:textSize">16sp</item>
</style>