当前位置: 代码迷 >> Android >> android的textView中添加链接的时候,若链接为email,程序直接挂掉,求解决解决方法
  详细解决方案

android的textView中添加链接的时候,若链接为email,程序直接挂掉,求解决解决方法

热度:72   发布时间:2016-05-01 22:07:38.0
android的textView中添加链接的时候,若链接为email,程序直接挂掉,求解决
Java code
  <TextView        android:id="@+id/text_body"        android:layout_width="match_parent"        android:layout_height="wrap_content"        android:layout_marginLeft="30dip"        android:layout_marginRight="0dip"        android:layout_marginTop="8dip"        android:autoLink="web|email"        android:textColor="#000"        android:textSize="14sp" />

Java code
02-21 15:06:00.753: E/AndroidRuntime(14254): android.content.ActivityNotFoundException: No Activity found to handle Intent { act=android.intent.action.VIEW dat=mailto:[email protected] (has extras) }

在textview中的文字为:
  [email protected]  
  请访问http://baidu.com
试过了点解email的时候会直接挂,点击百度链接则可以,求大家帮忙

------解决方案--------------------
你去试试吧autolick 换成后面的值换成all
------解决方案--------------------
加一个解析器,单独处理
  相关解决方案