spannablescala string.span可否同时设置多个span

Android(15)
最近4个月都在忙一个项目,最近项目接近尾声,所有打算趁这个机会稍微做一点总结。
本次总结的功能是实现一段文字,部分文字颜色不同,部分文字有下划线并且可以点击,主要的思路就是使用SpannableString,自定义一个ClickableSpan。以下就是实现该功能的具体步骤以及相关代码。
1.自定义ClickableSpan,通过不同的type去判断文字显示的颜色以及下划线显示状况。
public abstract class ClickableColorSpan extends ClickableSpan {
public ClickableColorSpan(int type) {
// this.str =
this.type =
public void updateDrawState(TextPaint ds) {
if (type == Constants.NOTHING)// 空格情况
// ds.setColor(ds.linkColor);
ds.setColor(getActivity().getResources().getColor(
R.color.linkcolor));
ds.setUnderlineText(false);//是否显示下划线
if (type == Constants.DESCRIPTION)// 解释或空格选择
ds.setColor(getActivity().getResources().getColor(
R.color.orange));
ds.setUnderlineText(false);
if (type == Constants.NORMAL)// 正常情况
// ds.setColor(ds.linkColor);
ds.setColor(getActivity().getResources().getColor(
R.color.linkcolor));
ds.setUnderlineText(true);
if (type == Constants.SELECTED)// 非空格选择
// ds.setColor(ds.linkColor);
ds.setColor(getActivity().getResources().getColor(
R.color.orange));
ds.setUnderlineText(true);
2.生成富文本
private SpannableString getClickableSpan() {
int start = 2;//设置点击范围
int end = 4;
SpannableString spanableInfo = new SpannableString(&hello word&);
spanableInfo.setSpan(
new ClickableColorSpan(0) {
public void onClick(View v) {
//点击事件
}, start, end, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
return spanableI
3.给控件赋值
txtView.setText(getClickableSpan());
txtView.setMovementMethod(LinkMovementMethod.getInstance());
&&相关文章推荐
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:25273次
排名:千里之外
原创:26篇
评论:19条
(1)(1)(2)(1)(1)(2)(1)(3)(3)(2)(1)(1)(1)(4)(3)(6)(2)&nbsp&#8250&nbsp&nbsp&#8250&nbsp
安卓文本样式-Spannable的使用
本文转载自 lixin84915的博客 & 原文分为上下两部分,本文将上下整理成了一篇文章。在android中,有
时候需要对文本进行各种特别的设置,比如颜色、大小、首行缩进,或者是在一段文本中加入图片,甚至是书写一些特殊的公式。如果通过布局文件使用多个控件来
实现,一方面会使的使用起来特别的复杂,增加了布局文件维护的难度,另一方面,如果加入了太多的控件,在页面加载时也要耗费更多的资源。如果在HTML
中,则可以使用各种标签来实现这些特殊效果,而在android中有类似的机制,只不过不是使用标签来实现,而是使用Spannable对象来实现。一、关于Spannable的构建:可以看出,Spannable继承自Spanned接口,而实际上,Spanned继承自CharSequence接口:在TextView的
setText(CharSequence
text)方法中,要求的参数正好是一个CharSequence对象,因此,我们可以通过Spannable对象来直接使用setText来完成文本的
设置。在使用中通常使用Spannable spn = new
SpannableString(&字符串&);或者通过SpannableStringBuilder对象来进行构建。二、给Spannable对象设置样式:在构建除了Spannable
对象以后,就可以使用spannable.setSpan(Obj what, int start, int end, int
flags)方法来进行样式的设置了,其中参数what是具体样式的实现对象,start则是该样式开始的位置,end对应的是样式结束的位置,参数
flags,定义在Spannable中的常量,常用的有:Spanned.SPAN_EXCLUSIVE_EXCLUSIVE --- 不包含两端start和end所在的端点&&&&&&&&&&&&& (a,b)Spanned.SPAN_EXCLUSIVE_INCLUSIVE --- 不包含端start,但包含end所在的端点&&&&&& (a,b]Spanned.SPAN_INCLUSIVE_EXCLUSIVE --- 包含两端start,但不包含end所在的端点&& [a,b)Spanned.SPAN_INCLUSIVE_INCLUSIVE--- 包含两端start和end所在的端点&&&&&&&&&&&&&&&&&&&& [a,b]但实际测试这其中似乎并未有差别,而在start和end相同的情况下,则只对start所在字符的当前行起作用。三、样式分析:用来构建样式的具体的类都在android.text.style包下,下面逐一进行分析。1.AbsoluteSizeSpan顾名思义,AbsoluteSizeSpan是指绝对尺寸,通过指定绝对尺寸来改变文本的字体大小。该类有三个构造函数:AbsoluteSizeSpan(int size)、AbsoluteSizeSpan(int size, boolean dip)、AbsoluteSizeSpan(Parcel src)。AbsoluteSizeSpan(int size):参数size, 以size的指定的像素值来设定文本大小。AbsoluteSizeSpan(int size, boolean dip):参数size,以size的指定像素值来设定文本大小,如果参数dip为true则以size指定的dip为值来设定文本大小。AbsoluteSizeSpan(Parcel src):参数src,包含有size和dip值的包装类。在该构造中public AbsoluteSizeSpan(Parcel src) {mSize = src.readInt();mDip = src.readInt() != 0;&&&&}使用范例:Parcel p = Parcel.obtain();p.writeInt(29);//字体大小p.writeInt(8);//是否是dip单位p.setDataPosition(0);AbsoluteSizeSpan ass = new AbsoluteSizeSpan(p);效果:2.AlignmentSpan.StandardAlignmentSpan.Standard,
标准文本对齐样式,该类有两个构造函数,AlignmentSpan.Standard(Layout.Alignment
align)和AlignmentSpan.Standard(Parcel
src)。AlignmentSpan.Standard(Layout.Alignment
align):参数align,Layout.Alignment类型的枚举值。包括居中、正常和相反三种情况。AlignmentSpan.Standard(Parcel
src):参数src,包含有标准字符串的Parcel类,其值应为&ALIGN_CENTER&、&ALIGN_NORMAL&
或&ALIGN_OPPOSITE&中的之一,对应Layout.Alignment枚举中的三个类型。使用示例:Parcel p = Parcel.obtain();p.writeString(\&ALIGN_CENTER\&);p.setDataPosition(0);AlignmentSpan.Standard standard = new AlignmentSpan.Standard(p);效果:3.BackgroundColorSpanBackgroundColorSpan,背景色样式,显然可以用来设定文本的背景色。该类有两个构造函数,BackgroundColorSpan(int color)和BackgroundColorSpan(Parcel src)。BackgroundColorSpan(int color):参数color,颜色值。BackgroundColorSpan(Parcel src):参数src,包含颜色值信息的包装类,使用方法如下:Parcel p = Parcel.obtain();p.writeInt(Color.GREEN);p.setDataPosition(0);BackgroundColorSpan bcs = new BackgroundColorSpan(p);效果:4.BulletSpanBulletSpan,
着重样式,类似于HTML中的&li&标签的圆点效果。该类有4个构造函数BulletSpan()、BulletSpan(int
gapWidth)、BulletSpan(int gapWidth,int color)、BulletSpan(Parcel src)。BulletSpan():仅提供一个与文本颜色一致的符号。BulletSpan(int gapWidth): 提供一个与文本颜色一致的符号,并指定符号与后面文字之间的空白长度。BulletSpan(int gapWidth,int color):提供一个指定颜色的符号,并指定符号与后面文字之间的宽度。BulletSpan(Parcel src):参数src,包含宽度、颜色信息的包装类,在以此构造时,构造函数的调用如下:mGapWidth = src.readInt();mWantColor = src.readInt() != 0;\nmColor = src.readInt();如果使用Parcel作为参数时,使用方式为:Parcel p = Parcel.obtain();p.writeInt(20);//设置gapWidthp.writeInt(1);//设置是否使用颜色p.writeInt(Color.YELLOW);//设置颜色p.setDataPosition(0);BulletSpan bs3 = new BulletSpan(p);效果:5.DrawableMarginSpanDrawableMarginSpan,图片+Margin样式,该类有两个构造函数:DrawableMarginSpan(Drawable b)、DrawableMarginSpan(Drawable b,int pad)。DrawableMarginSpan(Drawable b):参数b,用于显示的图片。DrawableMarginSpan(Drawable b,int pad):参数b,用于显示的图片,参数pad,图片和文字的距离。效果:6.ForegroundColorSpanForegroundColorSpan,字体颜色样式,用于改变字体颜色。该类有两个构造函数:ForegroundColorSpan(int color)、ForegroundColorSpan(Parcel src)。ForegroundColorSpan(int color):参数color,字体颜色。ForegroundColorSpan(Parcel src):参数src,包含字体颜色信息的包装类,使用如下:Parcel p = Parcel.obtain();p.writeInt(Color.YELLOW);p.setDataPosition(0);ForegroundColorSpan fcs = new ForegroundColorSpan(p);效果:7.IconMarginSpanIconMarginSpan,图标+Margin样式,该类与DrawableMarginSpan使用上很相似。本类有两个构造函数:IconMarginSpan(Bitmap b):参数b,用于显示图像的bitmap。IconMarginSpan(Bitmap b,int pad):参数b,用于显示图像的bitmap,参数pad,Bitmap和文本之间的间距。效果:8.ImageSpanImageSpan,图片样式,主要用于在文本中插入图片。本类构造函数较多,但主要是针对Bitmap和Drawable的,也可以通过资源Id直接加载图片。如下:ImageSpan(Bitmap b):.参数b,用于显示的Bitmap。该方法已过时,改用Use ImageSpan(Context, Bitmap)代替。ImageSpan(Bitmap b, int
verticalAlignment):参数b,用于显示的Bitmap,参数verticalAlignment,对齐方式,对应ImageSpan中
的常量值。该方法已过时,改用ImageSpan(Context, Bitmap, int)代替。ImageSpan(Context context, Bitmap b):参数context,传入的上下文,参数b,用于显示的Bitmap。ImageSpan(Context context, Bitmap b, int verticalAlignment):参数context,传入的上下文,参数b,用于显示的Bitmap,参数verticalAlignment,对齐方式。ImageSpan(Drawable d):参数d,用于显示的Drawable,此Drawable须设置大小。ImageSpan(Drawable d, int verticalAlignment):参数d,用于显示的Drawable,参数verticalAlignment,对齐方式。ImageSpan(Drawable d, String source):参数d,用于显示的Drawable,参数source,资源字符串。ImageSpan(Drawable d, String source, int verticalAlignment):参数d,用于显示的Drawable,参数source,资源字符串,参数verticalAlignment,对齐方式。ImageSpan(Context context, Uri uri):参数context,传入的上下文,参数uri,图片的uri。ImageSpan(Context context, Uri uri, int verticalAlignment):参数context,传入的上下文,参数uri,图片的uri,参数verticalAlignment,对齐方式。ImageSpan(Context context, int resourceId):参数context,传入的上下文,参数resourceId,图片的资源id。ImageSpan(Context context, int resourceId, int verticalAlignment)参数context,传入的上下文,参数resourceId,图片的资源id,参数verticalAlignment,对齐方式。效果:9.LeadingMarginSpanLeadingMarginSpan.Standard,文本缩进的样式。有3个构造函数,分别为:Standard(int arg0):参数arg0,缩进的像素。Standard(int arg0, int arg1):参数arg0,首行缩进的像素,arg1,剩余行缩进的像素。Standard(Parcel p): 参数p,包含缩进信息的包装类。在构造时,public Standard(Parcel src) {&&& mFirst = src.readInt();\n&+&&&&mRest = src.readInt();\n&+}使用方式:Parcel p = Parcel.obtain();p.writeInt(20);p.writeInt(30);p.setDataPosition(0);Standard lms = new Standard(p);效果:10.MaskFilterSpanMaskFilterSpan,滤镜样式,只有一个构造函数:MaskFilterSpan(MaskFilter filter):参数filter,滤镜样式。说明:在android系统里,MaskFilter提供了两个子类,BlurMaskFilter和EmbossMaskFilter,分别用来制作模糊效果和浮雕效果。效果:11.QuoteSpanQuoteSpan,引用样式,在文本左侧添加一条表示引用的竖线,该类有3个构造函数:QuoteSpan():无参构造,默认颜色为蓝色。QuoteSpan(int color):参数color,颜色值。QuoteSpan(Parcel src):包含颜色值信息的包装类。使用:Parcel p = Parcel.obtain();p.writeInt(Color.BLACK);p.setDataPosition(0);QuoteSpan qs = new QuoteSpan(p);效果:12.RasterizerSpanRasterizerSpan,字面义为光栅化,实际效果不明显,待完善。一个构造函数:RasterizerSpan(Rasterizer r):Rasterizer只有一个系统定义了的子类LayerRasterizer13.RelativeSizeSpanRelativeSizeSpan,相对大小,指相对于文本设定的大小的相对比例,如果没有设定则采用系统默认值。该类有两个构造函数:RelativeSizeSpan(float proportion):参数proportion,比例值。如果文字设定大小为A,则显示出来的大小为A×proportion。RelativeSizeSpan(Parcel src):参数src,包含了比例值信息的包装类。使用:Parcel p = Parcel.obtain();p.writeFloat(2.5f);p.setDataPosition(0);RelativeSizeSpan rss = new RelativeSizeSpan(p);效果:14.ScaleXSpanScaleXSpan,横向缩放样式,将字体按比例进行横向缩放。构造函数:ScaleXSpan(float proportion):参数proportion,缩放比例。如果字体设置的大小为A,则实际显示为A×proportion。ScaleXSpan(Parcel src):参数src,包含了缩放比例信息的包装类。使用:Parcel p = Parcel.obtain();p.writeFloat(2.5f);p.setDataPosition(0);ScaleXSpan rss = new ScaleXSpan(p);效果:15.StrikethroughSpanStrikethroughSpan,删除线样式。该类有两个构造函数:StrikethroughSpan()和SrickkethroughSapn(Parcel src)。但有参数的构造函数并未对src参数做处理,public StrikethroughSpan(Parcel src) {}因此这两个构造函数完全是同样的效果。16.StyleSpanStyleSpan,主要由正常、粗体、斜体和同时加粗倾斜四种样式,常量值定义在Typeface类中。构造函数:StyleSpan(int style):参数style,定义在Typeface中的常量。StyleSpan(Parcel src):参数src,包含字体信息的包装类,用法:Parcel p = Parcel.obtain();p.writeInt(Typeface.BOLD_ITALIC);p.setDataPosition(0);StyleSpan ss = new StyleSpan(p);效果:17.SubscriptSpanSubscriptSpan,脚注样式,比如化学式的常见写法,当然,还可以对脚注的文字做一定的缩放。构造函数:SubscriptSpan():无参构造。SubscriptSpan(Parcel src):一参构造,参数src并未起任何作用,源码中为:public SuperscriptSpan(Parcel src) {}效果:18.SuperscriptSpanSuperscriptSpan,上标样式,比如数学上的次方运算,当然,还可以对上标文字进行缩放。构造函数:SuperscriptSpan():无参构造。SuperscriptSpan(Parcel src):一参构造,参数src并未起任何作用,源码中为:public SuperscriptSpan(Parcel src) {}效果:19.TabStopSpanTabStopSpan.Standard,制表位偏移样式,距离每行的leading margin的偏移量,据测试在首行加入制表符时才产生效果。构造函数:TabStopSpan.Standard(int where):参数where,偏移量。效果:20.TextAppearanceSpanTextAppearanceSpan,使用style文件来定义文本样式,该类有4个构造函数:TextAppearanceSpan(Context context, int appearance):参数context,传入的上下文,参数appearance,引用的样式表,如R.style.my_style。TextAppearanceSpan(Context context, int appearance, int
colorList):参数context,使用的上下文,参数appearance,引用的样式表,如R.style.my_style,参数
colorList,使用方式未知,如果设置为小于0,则参数将不产生效果。TextAppearanceSpan(String family, int style, int size,ColorStateList
color, ColorStateList
linkColor):参数family,字体,仅支持系统自带的三种字体,MONOSPACE、SERIF和SANS,参数
style,TypeFace中定义的字体样式,BOLD、ITALIC等,参数size,字体大小,参数color,字体颜色,参数
linkColor,使用方式未知。TextAppearanceSpan(Parcel
src):参数src,含有样式信息的包装类,样式信息参照5参构造。使用:Parcel p = Parcel.obtain();p.writeString(\&SERIF\&);p.writeInt(Typeface.BOLD_ITALIC);p.writeInt(10);try {&&& ColorStateList colorlist =
ColorStateList.createFromXml(ctx.getResources(),ctx.getResources().getXml(R.drawable.parcelcolorlist));&&& p.writeInt(1);&&& colorlist.writeToParcel(p, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);&&& p.writeInt(1);&&& colorlist.writeToParcel(p, Parcelable.PARCELABLE_WRITE_RETURN_VALUE);} catch (Exception e) {&&& e.printStackTrace();}p.setDataPosition(0);TextAppearanceSpan tas = new TextAppearanceSpan(p);注:在这个设置中style似乎并未起到作用,另外关于这个类的colorList和linkColor参数的使用尚不明了,有待解答。效果:21.TypefaceSpanTypefaceSpan,字体样式,可以设置不同的字体,比如系统自带的SANS_SERIF、MONOSPACE和SERIF。构造函数:TypefaceSpan(String family):参数family,字体的值,以字符串表示。TypefaceSpan(Parcel src): 参数src,包含字体family信息的包装类,使用如下:Parcel p = Parcel.obtain();p.writeString(\&SERIF\&);p.setDataPosition(0);TypefaceSpan ts = new TypefaceSpan(p);&效果:22.UnderlineSpanUnderlineSpan,下划线样式,给一段文字加上下划线。构造函数:UnderlineSpan(): 无参构造。UnderlineSpan(Parcel src):一参构造, 与无参构造效果相同,构造中未对src做处理。源码:public UnderlineSpan(Parcel src) {}效果:23.URLSpanURLSpan,可以打开一个链接。两个构造函数:URLSpan(String url):参数url,链接地址。URLSpan(Parcel src):参数src,包含链接地址信息的包装类,使用如下:Parcel p = Parcel.obtain();p.writeString(&.cn&);p.setDataPosition(0);URLSpan us = new URLSpan(p);效果:四、标注:以上效果均在android2.3中测试,以后新增的几个类并未做说明,上面的类中还有几处使用的不甚明了的地方,希望能够尽快的完善。以上所有的效果均写在了一个APK里,源码已上传至
上一篇: 转载自csdn lixin84915的博客 Android里PathEffect的使用 Path类是绘图里的一个常用类之一,会按照指定的路径绘制图形,如果将画笔的Style设定为Stroke,则会看到由一条条线组成图形。然而这些图形看上去往往很单调,而且有的时候我们也需要绘制虚线,或者由
下一篇: 2015年伊始,Google发布了关于 Android性能优化典范的专题 ,一共16个短视频,每个3-5分钟,帮助开发者创建更快更优秀的Android App。课程专题不仅仅介绍了Android系统中有关性能问题的底层工作原理,同时也介绍了如何通过工具来找出性能问题以及提升性能的android(11)

当连续调用SpannableStringBuilder.setSpan时,第一个参数Object what不能使用同一个引用,否则只有最后一个设置有效
SpannableStringBuilder builder=new SpannableStringBuilder(list.get(position));
ForegroundColorSpan redSpan=new ForegroundColorSpan(Color.RED);
builder.setSpan(redSpan, 0,
&&&&&1, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
builder.setSpan(redSpan,1,
&&&&&2, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
builder.setSpan(redSpan,2,
&&&&&3, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
此时,只有最后一个是有效果的,这是因为SpannableStringBuilder内部会保存设置的所有object,每次setspan都会先判断是否已存在该object
解决方法:只需要把setSpan中的redSpan 改为new ForegroundColorSpan(Color.RED)即可:
builder.setSpan(new ForegroundColorSpan(Color.RED), 0,
&&&&&1, Spannable.SPAN_INCLUSIVE_INCLUSIVE);
&&相关文章推荐
参考知识库
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
访问:9170次
排名:千里之外
原创:31篇
(1)(5)(7)(2)(1)(14)(1)(1)(1)(1)(1)(1)(1)查看: 10190|回复: 8
spannableString.setSpan(new ClickableSpan())点击问题
签到天数: 2 天连续签到: 1 天[LV.1]初来乍到主题帖子e币
text是微博数据,里面可能包括#话题#、@微博等数据,通过下面代码能得到#话题#的位置,我是想通过 spannableString.setSpan(new ClickableSpan())给#话题#添加点击事件,但现在问题是,#话题#有的数据会响应,但是有的数据不会响应?
不知道我的思路有问题还是代码的问题?
spannableString = new SpannableString(text);
//设置颜色
spannableString.setSpan(new ForegroundColorSpan(Color.BLUE),
& &&&i.get(2 * n - 1), i.get(2 * n),
& &&&Spannable.SPAN_EXCLUSIVE_INCLUSIVE);
int start1 = -1; // 首 # 位置
&&int end1 = -1; // 尾 # 位置
&&int now = 0;
&&// String str = textS
&&for (int i = 0; i & spannableString.length(); i++)
& &// System.out.println(str.charAt(i));
& &if (&#&.equals(spannableString.charAt(i) + &&))
& & now++; // 如果是 # 记录是第几个
& & if (now % 2 == 1)
& & { // 判断是否是 首 #
& &&&start1 = i + 1; // 记录 首 # 位置
& &&&now = 1;
& & } else if (now % 2 == 0)
& & { // 判断是否是 尾 #
& &&&end1 = // 记录 尾 # 位置
//& && &final String myStr = text.substring(start1, end1); // 发现
& && &final String myStr = spannableString.subSequence(start1, end1).toString(); // 发现
& &&&// 尾
& &&&// #,截取所需字符串
& &&&spannableString.setSpan(new ClickableSpan()
& && &@Override
& && &public void onClick(View widget)
& && & // TODO Auto-generated method stub
& && &&&Intent intent=new Intent(context,HtActivity.class);
& && &&&intent.putExtra(&htname&, myStr);
& && &&&context.startActivity(intent);
& && & System.out.println(&点击事件~~~~~~~&+myStr);
& &&&}, start1, end1, Spanned.SPAN_INCLUSIVE_INCLUSIVE);
& &&&System.out.println(&start:& + start1 + &end:& + end1
& && & + &spannableString:& + spannableString.length()+&话题:&+myStr);
&&return spannableS
目测好像没啥错误,tv.setMovementMethod(LinkMovementMethod.getInstance());加上试试呢?
该用户从未签到主题帖子e币
目测好像没啥错误,tv.setMovementMethod(LinkMovementMethod.getInstance());加上试试呢?
可以了~~非常感谢!!回去看一下原因所在吧~~&
签到天数: 2 天连续签到: 1 天[LV.1]初来乍到主题帖子e币
futurexiong 发表于
目测好像没啥错误,tv.setMovementMethod(LinkMovementMethod.getInstance());加上试试呢?
可以了~~非常感谢!!回去看一下原因所在吧~~
恩,分析出原因可以再上来跟大家分享下。&
该用户从未签到主题帖子e币
nmgchfzhzhg 发表于
可以了~~非常感谢!!回去看一下原因所在吧~~
恩,分析出原因可以再上来跟大家分享下。
该用户从未签到主题帖子e币
求原因~~~我现在是在一个适配器里面写,和你的都一样,也是不写这句话,但是点击没反应。。。help
tv.setMovementMethod(LinkMovementMethod.getInstance());
我的是在一个微博的内容里面的一个用户名字,所以有必要加一个textview吗?
求高手指导
该用户从未签到主题帖子e币
我也在犯这个问题,按照二楼方法确实可以
该用户从未签到主题帖子e币
请问楼主,如果listView的item中有textView,此textView设置了ClickableSpan(),但item也有点击事件,这时候会出现点此span的时候既响应了item的点击事件,又响应了ClickableSpan()。这该怎么处理?我希望此时不响应item事件
同问!我的是textview 里有个spannablestring,点击span的时候,会触发两个点击事件.我想阻断spannablestring的事件,不让它往textview上传了,请问应该怎么做?&
签到天数: 1 天连续签到: 1 天[LV.1]初来乍到主题帖子e币
请问楼主,如果listView的item中有textView,此textView设置了ClickableSpan(),但item也有点击事件,这时 ...
同问!我的是textview 里有个spannablestring,点击span的时候,会触发两个点击事件.我想阻断spannablestring的事件,不让它往textview上传了,请问应该怎么做?
签到天数: 177 天连续签到: 1 天[LV.7]常住居民III主题帖子e币
ClickableSpan 按下有背景色怎么设置?
社区贡献者
eoeAndriod社区贡献网友
QQ已认证,此人靠谱
推荐阅读热门话题
61886420384328281281261252226218210208204201715
1&小时前6&小时前7&小时前7&小时前7&小时前7&小时前7&小时前7&小时前7&小时前8&小时前9&小时前9&小时前13&小时前13&小时前昨天&23:48昨天&23:36
Powered by

我要回帖

更多关于 spannedstring用法 的文章

 

随机推荐