直接贴代码

  

textContent = (TextView) findViewById(R.id.content);String strLoadString="点击我";CharSequence charSequence = Html.fromHtml(strLoadString);textContent.setText(charSequence);textContent.setClickable(true);textContent.setMovementMethod(LinkMovementMethod.getInstance());

xml代码

 

          

一定不要加  android:autoLink 属性  否则html里面加载的a标签就无效


更多相关文章

  1. Android实战项目:第一行代码CoolWeather
  2. android apk 升级代码
  3. Android 相机2之常用工具代码(预览方向、预览尺寸、全屏显示、分
  4. [置顶] Android防火墙+流量统计代码
  5. Android应用程序获取ROOT权限代码
  6. android 个人铃声设置代码
  7. android典型代码系列(九)------电话拦截
  8. Android里用代码设置View的相关属性

随机推荐

  1. 源码项目Android(安卓)使用Zxing2.1 来读
  2. 用android studio写一个简单并且bug奇多
  3. Android培训班(26)
  4. Android异步更新UI的方式之使用AsyncTask
  5. android:Read-only file system解决
  6. java 课堂总笔记
  7. android 旋转动画一直转,不卡顿
  8. android activity启动模式
  9. ActionBar的使用
  10. 动态壁纸,视频特效- Android