在Android文字可以设置的属性包括大小,颜色,是否是密码,是否显示阴影,超链接,文字无法显示的时候的省略规则等。

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"android:orientation="vertical"android:layout_width="fill_parent"android:layout_height="fill_parent"><!-- 设置字体为20pt  --><TextViewandroid:layout_width="fill_parent" android:layout_height="wrap_content" android:text="我爱yanzi"android:textSize="20pt"/><!-- 设置中间省略 --><TextViewandroid:layout_width="fill_parent" android:layout_height="wrap_content"android:singleLine="true" android:text="我爱yanzi我爱yanzi我爱yanzi我爱yanzi我爱yanzi我aaayanzi"android:ellipsize="middle"/><!-- 对网址增加链接 --><TextViewandroid:layout_width="fill_parent" android:layout_height="wrap_content"android:singleLine="true" android:text="测试http://blog.csdn.net/hn307165411内容"android:autoLink="all"/><!-- 设置文字颜色 、大小,并使用阴影 --><TextViewandroid:layout_width="fill_parent" android:layout_height="wrap_content" android:text="测试文字"android:shadowColor="#0000ff"android:shadowDx="15.0"android:shadowDy="20.0"android:shadowRadius="45.0"android:textColor="#ff0000"android:textSize="25pt"/><!-- 测试密码框 --><TextView android:id="@+id/passwd"android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="@string/hello"android:password="true"/></LinearLayout>


更多相关文章

  1. android自动化测试工具---monkeyrunner工具
  2. android去掉layout顶部的阴影(状态栏下边的阴影)
  3. android 8.1 vts环境和测试
  4. [Android]再简单解释一下androidtest包下的其他测试类
  5. Android中TextView 添加ClickableSpan后点击选中文字背景变色问
  6. Android阴影
  7. android PopupWindow 阴影背景 、动画 、点击显示、隐藏
  8. Android CTS测试Fail项修改总结(四)
  9. Android测试总结

随机推荐

  1. Android(安卓)Camera的使用(一)
  2. 活动总结:Android开发者的学习热情(CMDN Cl
  3. android压缩图片保存为文件后显示方向被
  4. Android配置启动页
  5. Android(安卓)Solution之我见
  6. 最受Java编码员和程序员欢迎的好助手:Andr
  7. Android(安卓)仿知乎创意广告 广告还能这
  8. Android使用Fiddler模拟弱网络环境测试(转
  9. Android资源文件及文件夹介绍
  10. Android(安卓)studio edit view 边框显示