<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:text="Button" />
我们在布局文件里面设置的文字是“Button”,但最终的显示结果却是“BUTTON”。这是由于系统会对Button中的所有英文字母自动进行大写转换,如果你不想要的效果,可以使用如下配置来禁用这一默认特性:
<Button
android:id="@+id/button"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:textAllCaps="false"
android:text="Button" />