摘要: 在使用过程中,1 TypedArray a = getContext().obtainStyledAttributes(attrs, R.styleable.ContactListItemView);2 mPreferredHeight = a.getDimensionPixelSize(3 R.styleable.ContactListItemView_list_item_height, 0);4 mActivatedBackgroundDrawable = a.getDrawable(5 R.styleable.ContactListItemView_activated_backgroun 阅读全文
posted @ 2013-01-10 15:19 Hecker385 阅读(18028) 评论(1) 推荐(5) 编辑
摘要: TextView通常用来显示普通文本,但是有时候需要对其中某些文本进行样式、事件方面的设置。Android系统通过SpannableString类来对指定文本进行相关处理,具体有以下功能:1、BackgroundColorSpan 背景色2、ClickableSpan 文本可点击,有点击事件3、ForegroundColorSpan 文本颜色(前景色)4、MaskFilterSpan 修饰效果,如模糊(BlurMaskFilter)、浮雕(EmbossMaskFilter)5、MetricAffectingSpan 父类,一般不用6、RasterizerSpan 光栅效果7、Strikethr 阅读全文
posted @ 2013-01-10 09:52 Hecker385 阅读(46066) 评论(0) 推荐(2) 编辑