Android ---android:autoLink属性
16lz
2021-01-23
URL链接 email 链接
TextView识别链接的方式有两种,一种是自动识别链接和HTML解析链接
自动识别链接:
<!-- android:autoLink="web"-设置自动识别链接,值web为匹配Web网址 -->
<!--android:autoLink="phone"-设置自动识别链接,值phone为匹配电话号码 -->
<!-- android:autoLink="email"-设置自动识别链接,值email为匹配Email地址 -->
<!-- android:autoLink="all"-设置自动识别链接,值all为匹配所有 -->
例子:
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:autoLink="all"
android:text=" 网址:http://www.thinkandroid.cn。qq群:169415162 邮箱:liubin8095@126.com"
android:textSize="16dp" />
更多相关文章
- android Intent打开URL链接
- 网页链接拉起Unity Android和iOS APP
- Android -- 文字设置超链接
- Android中的RecyclerView学习网址
- ADB和Fastboot最新版的谷歌官方下载链接
- Android各版本源码下载链接
- Android Studio 关联项目软链接
- Android 部分内容设置颜色、字体、超链接、图片
- Android Studio 1.0 官网下载链接