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

来源:互联网 发布:哪种编程语言最厉害 编辑:程序博客网 时间:2024/05/17 17:16

今天在写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>


0 0
原创粉丝点击