在Button中显示的英文字母默认是全部大写的

    <Button        android:id="@+id/textview"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:gravity="center"        android:text="I'm Capital" />


下面介绍两种简单的设置原本大小写的方法:

  1. xml中设置**(android:textAllCaps=“false”)**

    <Button    android:id="@+id/textview"    android:layout_width="match_parent"    android:layout_height="wrap_content"    android:gravity="center"    android:text="I'm Capital"    android:textAllCaps="false" />
  2. 代码中设置**(setAllCaps(false))**

       textView = (Button) findViewById(R.id.textview);          textView.setAllCaps(false);

以上方法任意一种都可以,设置后的显示效果如下:

更多相关文章

  1. android发送http请求—-URLConnection、HttpURLConnection的使用
  2. android小游戏 飞机躲子弹
  3. Android切换前后置摄像头并录制视频
  4. android实现为PreferenceScreen设置背景图片等
  5. Android(安卓)onConfigurationChanged 不执行
  6. Android(安卓)开发:glide圆角正确实现方法
  7. Android高手进阶教程(九)之 ----Android(安卓)Handler的使用
  8. Android设置输入法
  9. android中,如果使用imageButton可以在drawable 中设置一个selecto

随机推荐

  1. android 签名文件
  2. Android智能指针sp wp详解
  3. android中的分享功能
  4. android pull解析
  5. Android(安卓)socket网络编程要注意
  6. 国内中文Android开发者社区和论坛
  7. 三,android编码规范 & 常用布局 & 常用控
  8. Android(安卓)OpenGL ES学习
  9. ARCVM:Chrome OS 中运行 Android(安卓)应
  10. Android项目优化宝典