在较新的 sdk 版本中,我们会看到按钮的英文显示为大写的,有两种解决方法:
1.在values/styles.xml文件中添加属性,取消默认大写的设置。
<item name="android:textAllCaps">false</item>
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">@color/colorPrimary</item>
<item name="colorPrimaryDark">@color/colorPrimaryDark</item>
<item name="colorAccent">@color/colorAccent</item>
<item name="android:textAllCaps">false</item>
</style>
</resources>
2.修改Button控件代码,增加属性textAllCaps=false。