安卓学习第四课——textview(1)

今天学的textview

第一个学的是了解textView有哪些用法。

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
  >
  <!-- 设置自豪为20pt,文本框结尾处绘制图片 -->
<TextView 
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="我爱java"
    android:gravity="center"
    android:fontFamily=""
    android:textSize="20pt"
    android:drawableStart="@drawable/ic_launcher"
    />
<!-- 设置中间省略,所有字母大写 -->

<TextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:ellipsize="marquee"
    android:singleLine="true"
    android:text="我爱java,我爱java我爱java我爱java我啊啊啊啊java"
    android:textAllCaps="true" />
<!-- 对邮件电话增加链接 -->
<TextView 
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:singleLine="true"
    android:text="邮件是kongyeeku@163.com,电话是02088888888"
    android:autoLink="email|phone"  />
<TextView 
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="测试文字"
    android:shadowColor="#00f"
    android:shadowDx="10.0"
    android:shadowDy="8.0"
    android:shadowRadius="3.0"
    android:textColor="#f00"
    android:textSize="18pt"/>
<!-- 测试密码框 -->
<TextView 
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:id="@+id/passpad"
    android:text="hello"
    android:password="true"/>
<CheckedTextView
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:text="可勾选的文本框"
    android:checkMark="?android:attr/listChoiceIndicatorMultiple" 
    />
</LinearLayout>

学到的是:字省略,文字前后插图片,大小写,邮件电话号码链接,密码格式。

问题?

1. android:ellipsize="marquee"没有显示移动的现象,不知道为什么

2.android:checkMark="?android:attr/listChoiceIndicatorMultiple" 这个的使用方法还是不懂。

 

posted @ 2014-07-14 17:26  Yvettey  阅读(175)  评论(0)    收藏  举报