推荐当贝市场

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 18278|回复: 0

[教程] Android 设置TextView的超链接

[复制链接]
发表于 2013-8-28 16:28 | 显示全部楼层 |阅读模式
1Android TextView URL 、电话与电邮超链接设置,android textview 控件,android textview 超链接,android textview 电话,android textview 电子邮件,android textview web ,android textview phone ,android textview emAIl ,android textview url 。   
  android:autoLink   
  设置是否当文本为 URL链接、Email 、电话号码、Map 时,文本显示为可点击的链接。   
  可选值:none / web / email / phone / map / all 。   
   
  1、网页超链接设置   
   
  main.xml 文件   
   
  1.    
    <?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">   
       
       
    <TextViewandroid:autoLink="all|web"   
       
    android:layout_width="fill_parent"   
    android:layout_height="wrap_content"   
    android:text=""/>   
       
    </LinearLayout>
复制代码
2、电话超链接设置   
   
   
  1.    
    <?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">   
       
    <TextViewandroid:autoLink="all|phone"   
       
    android:layout_width="fill_parent"   
    android:layout_height="wrap_content"   
    android:text=""/>   
       
    </LinearLayout>
复制代码
</div
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

站长推荐上一条 /2 下一条

Archiver|小黑屋|新帖|标签|软件|Sitemap|ZNDS智能电视网 ( 苏ICP备2023012627号 )

GMT+8, 2026-11-6 06:41 , Processed in 0.021265 second(s), 7 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2026 Discuz! Team.

快速回复 返回顶部 返回列表