android SpannableString + 图文混排 + @功能

上传者: yanjunhui2011 | 上传时间: 2021-05-14 10:22:41 | 文件大小: 2.42MB | 文件类型: RAR
最近项目里因为有一些图文混排的需求,需要在Android TextView 增加多种类型的数据,诸如图片、按钮、拨号、链接、@功能等等。 示例1:使用 SpannableString,试了一下效果一般。(新手推荐) 示例2:后面也是参考了前辈的代码,自己重写了几个组件,并加以工具类的控制,将效果控制的更好。(推荐) 我以后所有的资源都挂0分,方便网友们下载,也希望网友们多多回复,以表支持。 如果不知道什么是SpannableString的朋友可以参考下面的链接 http://blog.csdn.net/lan410812571/article/details/9083023

文件下载

资源详情

[{"title":"( 86 个子文件 2.42MB ) android SpannableString + 图文混排 + @功能","children":[{"title":"AitaButton","children":[{"title":".project <span style='color:#111;'> 846B </span>","children":null,"spread":false},{"title":"project.properties <span style='color:#111;'> 607B </span>","children":null,"spread":false},{"title":"src","children":[{"title":"com","children":[{"title":"example","children":[{"title":"aitabutton","children":[{"title":"Sample2Activity.java <span style='color:#111;'> 935B </span>","children":null,"spread":false},{"title":"utils","children":[{"title":"EmotionImageGetter.java <span style='color:#111;'> 2.44KB </span>","children":null,"spread":false},{"title":"HtmlUtils.java <span style='color:#111;'> 4.78KB </span>","children":null,"spread":false}],"spread":true},{"title":"widget","children":[{"title":"LinkClickTextView.java <span style='color:#111;'> 2.65KB </span>","children":null,"spread":false}],"spread":true},{"title":"Sample1Activity.java <span style='color:#111;'> 4.55KB </span>","children":null,"spread":false},{"title":"MainActivity.java <span style='color:#111;'> 1.57KB </span>","children":null,"spread":false},{"title":"dao","children":[{"title":"ITAInitialization.java <span style='color:#111;'> 149B </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"AndroidManifest.xml <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"res","children":[{"title":"drawable-ldpi","children":null,"spread":false},{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 7.48KB </span>","children":null,"spread":false},{"title":"emotion_small_001.png <span style='color:#111;'> 2.05KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-v11","children":[{"title":"styles.xml <span style='color:#111;'> 331B </span>","children":null,"spread":false}],"spread":true},{"title":"menu","children":[{"title":"main.xml <span style='color:#111;'> 425B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.69KB </span>","children":null,"spread":false}],"spread":true},{"title":"layout","children":[{"title":"activity_sample2.xml <span style='color:#111;'> 1.26KB </span>","children":null,"spread":false},{"title":"activity_sample1.xml <span style='color:#111;'> 2.23KB </span>","children":null,"spread":false},{"title":"activity_main.xml <span style='color:#111;'> 971B </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 24.20KB </span>","children":null,"spread":false}],"spread":true},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 12.22KB </span>","children":null,"spread":false}],"spread":true},{"title":"values-w820dp","children":[{"title":"dimens.xml <span style='color:#111;'> 381B </span>","children":null,"spread":false}],"spread":false},{"title":"values","children":[{"title":"strings.xml <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"styles.xml <span style='color:#111;'> 699B </span>","children":null,"spread":false},{"title":"dimens.xml <span style='color:#111;'> 220B </span>","children":null,"spread":false}],"spread":false},{"title":"values-v14","children":[{"title":"styles.xml <span style='color:#111;'> 388B </span>","children":null,"spread":false}],"spread":false}],"spread":false},{"title":".settings","children":[{"title":"org.eclipse.jdt.core.prefs <span style='color:#111;'> 177B </span>","children":null,"spread":false}],"spread":true},{"title":"assets","children":null,"spread":false},{"title":"gen","children":[{"title":"com","children":[{"title":"example","children":[{"title":"aitabutton","children":[{"title":"BuildConfig.java <span style='color:#111;'> 164B </span>","children":null,"spread":false},{"title":"R.java <span style='color:#111;'> 178.37KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true},{"title":"android","children":[{"title":"support","children":[{"title":"v7","children":[{"title":"appcompat","children":[{"title":"R.java <span style='color:#111;'> 40.12KB </span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}],"spread":true},{"title":"libs","children":[{"title":"android-support-v4.jar <span style='color:#111;'> 740.94KB </span>","children":null,"spread":false}],"spread":true},{"title":".classpath <span style='color:#111;'> 475B </span>","children":null,"spread":false},{"title":"proguard-project.txt <span style='color:#111;'> 781B </span>","children":null,"spread":false},{"title":"ic_launcher-web.png <span style='color:#111;'> 50.19KB </span>","children":null,"spread":false},{"title":"bin","children":[{"title":"resources.ap_ <span style='color:#111;'> 383.89KB </span>","children":null,"spread":false},{"title":"R.txt <span style='color:#111;'> 30.84KB </span>","children":null,"spread":false},{"title":"classes","children":[{"title":"com","children":[{"title":"example","children":[{"title":"aitabutton","children":[{"title":"R$layout.class <span style='color:#111;'> 1.69KB </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 9.41KB </span>","children":null,"spread":false},{"title":"R$dimen.class <span style='color:#111;'> 1.57KB </span>","children":null,"spread":false},{"title":"BuildConfig.class <span style='color:#111;'> 353B </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 5.13KB </span>","children":null,"spread":false},{"title":"utils","children":[{"title":"HtmlUtils$1.class <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"EmotionImageGetter.class <span style='color:#111;'> 3.33KB </span>","children":null,"spread":false},{"title":"HtmlUtils.class <span style='color:#111;'> 5.01KB </span>","children":null,"spread":false},{"title":"HtmlUtils$MyURLSpan.class <span style='color:#111;'> 1.63KB </span>","children":null,"spread":false}],"spread":false},{"title":"R$attr.class <span style='color:#111;'> 5.00KB </span>","children":null,"spread":false},{"title":"widget","children":[{"title":"LinkClickTextView$LocalLinkMovementMethod.class <span style='color:#111;'> 2.17KB </span>","children":null,"spread":false},{"title":"LinkClickTextView.class <span style='color:#111;'> 1.25KB </span>","children":null,"spread":false}],"spread":false},{"title":"Sample2Activity.class <span style='color:#111;'> 1.22KB </span>","children":null,"spread":false},{"title":"R$bool.class <span style='color:#111;'> 745B </span>","children":null,"spread":false},{"title":"R$integer.class <span style='color:#111;'> 427B </span>","children":null,"spread":false},{"title":"Sample1Activity$1.class <span style='color:#111;'> 1010B </span>","children":null,"spread":false},{"title":"dao","children":[{"title":"ITAInitialization.class <span style='color:#111;'> 185B </span>","children":null,"spread":false}],"spread":false},{"title":"R$id.class <span style='color:#111;'> 2.95KB </span>","children":null,"spread":false},{"title":"R$anim.class <span style='color:#111;'> 611B </span>","children":null,"spread":false},{"title":"Sample1Activity.class <span style='color:#111;'> 3.31KB </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 981B </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 1.51KB </span>","children":null,"spread":false},{"title":"R$menu.class <span style='color:#111;'> 400B </span>","children":null,"spread":false},{"title":"MainActivity.class <span style='color:#111;'> 2.55KB </span>","children":null,"spread":false},{"title":"R$color.class <span style='color:#111;'> 576B </span>","children":null,"spread":false},{"title":"R$styleable.class <span style='color:#111;'> 6.55KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"android","children":[{"title":"support","children":[{"title":"v7","children":[{"title":"appcompat","children":[{"title":"R$layout.class <span style='color:#111;'> 1.59KB </span>","children":null,"spread":false},{"title":"R$style.class <span style='color:#111;'> 9.36KB </span>","children":null,"spread":false},{"title":"R$dimen.class <span style='color:#111;'> 1.49KB </span>","children":null,"spread":false},{"title":"R$drawable.class <span style='color:#111;'> 5.07KB </span>","children":null,"spread":false},{"title":"R$attr.class <span style='color:#111;'> 5.02KB </span>","children":null,"spread":false},{"title":"R$bool.class <span style='color:#111;'> 763B </span>","children":null,"spread":false},{"title":"R$integer.class <span style='color:#111;'> 445B </span>","children":null,"spread":false},{"title":"R$id.class <span style='color:#111;'> 2.50KB </span>","children":null,"spread":false},{"title":"R$anim.class <span style='color:#111;'> 629B </span>","children":null,"spread":false},{"title":"R.class <span style='color:#111;'> 1015B </span>","children":null,"spread":false},{"title":"R$string.class <span style='color:#111;'> 1.11KB </span>","children":null,"spread":false},{"title":"R$color.class <span style='color:#111;'> 594B </span>","children":null,"spread":false},{"title":"R$styleable.class <span style='color:#111;'> 6.39KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"AndroidManifest.xml <span style='color:#111;'> 1.12KB </span>","children":null,"spread":false},{"title":"dexedLibs","children":[{"title":"android-support-v4-3d2e538e808bce7858441b1de4fe2440.jar <span style='color:#111;'> 267.35KB </span>","children":null,"spread":false},{"title":"appcompat_v7-09dddd53799867f3e38e1ac366b8de87.jar <span style='color:#111;'> 166B </span>","children":null,"spread":false},{"title":"android-support-v7-appcompat-f870a969cd5ac478e87909cdb13561f7.jar <span style='color:#111;'> 147.04KB </span>","children":null,"spread":false}],"spread":false},{"title":"jarlist.cache <span style='color:#111;'> 380B </span>","children":null,"spread":false},{"title":"res","children":[{"title":"crunch","children":[{"title":"drawable-hdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 5.82KB </span>","children":null,"spread":false},{"title":"emotion_small_001.png <span style='color:#111;'> 1.96KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-mdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 3.04KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-xxhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 17.47KB </span>","children":null,"spread":false}],"spread":false},{"title":"drawable-xhdpi","children":[{"title":"ic_launcher.png <span style='color:#111;'> 9.14KB </span>","children":null,"spread":false}],"spread":false}],"spread":false}],"spread":false},{"title":"AitaButton.apk <span style='color:#111;'> 825.14KB </span>","children":null,"spread":false},{"title":"classes.dex <span style='color:#111;'> 1.48MB </span>","children":null,"spread":false}],"spread":true}],"spread":false}],"spread":true}]

评论信息

  • flyang08 :
    可以学习研究
    2018-07-06
  • SWhard :
    感謝LZ收集,用起來挺方便.
    2018-04-20
  • 滴喵 :
    这个例子有异常呀,功能根本就没法用
    2016-08-01
  • rexueFC :
    很好,很实用,谢谢
    2016-05-25
  • 一只蜗牛的梦想 :
    刚好解决了我实际问题
    2016-04-25

免责申明

【只为小站】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【只为小站】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【只为小站】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,zhiweidada#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明