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

    xiaoxiao2021-04-17  55

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

    转载请注明原文地址: https://ju.6miu.com/read-673323.html

    最新回复(0)