android:text 总为大写字母的原因

当设置某个 Button 的 text 为英文时,界面上显示的是该英文的大写形式(uppercase)。例如:

<Button
    android:id="@+id/btn"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello"/>

Button 显示的文本为:

HELLO

经查询,一般原因是 textAllCaps 属性被设置为 true。因此,只要将该属性设置为 false 即可。

<Button
    android:id="@+id/btn"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:text="Hello"
    android:textAllCaps="false"/>

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-06-08 18:40:08       98 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-06-08 18:40:08       106 阅读
  3. 在Django里面运行非项目文件

    2024-06-08 18:40:08       87 阅读
  4. Python语言-面向对象

    2024-06-08 18:40:08       96 阅读

热门阅读

  1. input只允许输入数字

    2024-06-08 18:40:08       30 阅读
  2. 数据结构汇总学习(ing)

    2024-06-08 18:40:08       25 阅读
  3. 注解 - @RequestBody

    2024-06-08 18:40:08       34 阅读
  4. 阿里云一键登录号码认证服务

    2024-06-08 18:40:08       41 阅读
  5. pytorch里面封装好的函数,如果要修改怎么办

    2024-06-08 18:40:08       44 阅读
  6. C语言——第五章习题

    2024-06-08 18:40:08       26 阅读
  7. 动手学深度学习——tensor

    2024-06-08 18:40:08       32 阅读
  8. MySQL 运算符以及优先级

    2024-06-08 18:40:08       45 阅读
  9. MATLAB 函数 function

    2024-06-08 18:40:08       44 阅读
  10. 源码编译OpenCV 启用cuda 加速

    2024-06-08 18:40:08       38 阅读
  11. 【Qt】Qt中的几种Timer

    2024-06-08 18:40:08       29 阅读