在使用Android Studio時,在佈局文件裏,默認Button的text屬性英文都會強制變大寫,即使其實是小寫的。添加以下屬性解決問題:
android:textAllCaps="false"
例如:
<Button
android:id="@+id/button"
android:textAllCaps="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button"/>