100字范文,内容丰富有趣,生活中的好帮手!
100字范文 > Android Studio:Button控件中英文字母全部默认显示为大写的解决方法

Android Studio:Button控件中英文字母全部默认显示为大写的解决方法

时间:2021-02-20 07:58:00

相关推荐

Android Studio:Button控件中英文字母全部默认显示为大写的解决方法

今天在写xml布局文件的时候发现Button控件的英文文本全部以大写显示了!(用的Android Studio)

<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="15dp" android:orientation="vertical"><Button android:id="@+id/btn_readText" android:layout_width="match_parent" android:layout_height="wrap_content" android:text="readtext" /></LinearLayout>

解决办法:添加 android:textAllCaps="false" 即可,取消英文大写显示

<LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:layout_margin="15dp" android:orientation="vertical"><Button android:id="@+id/btn_readText" android:layout_width="match_parent" android:layout_height="wrap_content" android:textAllCaps="false" android:text="readtext" /></LinearLayout>

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。