Android培訓三十二課第六講

 Anroid是一種以嵌入式爲基礎的開放源碼操作系統,Android培訓第六課

TextViewAPI 中文文檔中 說明它的結構
結構
java.lang.Object
   android.view.View
        android.widget.TextView
直接子類:
    Button, CheckedTextView, Chronometer, DigitalClock, EditText
間接子類:
     AutoCompleteTextView, CheckBox, CompoundButton, ExtractEditText,MultiAutoCompleteTextView, RadioButton, ToggleButton
1.TextView中鏈接手機號碼/網頁/郵件/地圖

android:autoLink的可選值爲(none/web/email/phone/map/all) 設置一個URL鏈接 ,可以點擊訪問。

例如:android:text="撥打手機:400-650-3060"

            android:autoLink="phone"

   這裏設置了一個鏈接爲手機的autoLink  它會自動設別數字 過濾掉字符串"撥打手機:從而點擊號碼後會轉跳到系統撥號碼的界面可以撥打電話。

撥打手機號碼:

1         <TextView android:id="@+id/textView0"

2                   android:layout_width="fill_parent"

3                           android:layout_height="wrap_content"

4                           android:textColor="#FF0000"

5                           android:textSize="18dip"

6                           android:background="#FFFFFF"

7                       android:text="撥打手機:13888888888"

8                       android:gravity="center_vertical|center_horizontal"

9                       android:autoLink="phone"

10                       />

 

1        <TextView android:id="@+id/textView1"

2                   android:layout_width="fill_parent"

3                           android:layout_height="wrap_content"

4                           android:textColor="#FF0000"

5                           android:textSize="18dip"

6                           android:background="#00FF00"

7                       android:text="雨鬆MOMO的博客:http://blog.csdn.net/xys289187120"

8                       android:gravity="center_vertical|center_horizontal"

9                       android:autoLink="web"

10                       />

 

進入Android培訓三十二課第六講(下)——》http://www.akaedu.org/page/newsdetail-2016.html

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章