Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
liuchch authored Feb 24, 2019
1 parent a967fc9 commit dd574bd
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# SmartTextView
一个聪明的TextView 1.0.1版本已经可以实现对于一段文字中的部分文字更改字体颜色,以及添加点击事件。

# 一个聪明的TextView 1.0.1版本已经可以实现对于一段文字中的部分文字更改字体颜色,以及添加点击事件

#### 1.需要将strings.xml文件中的文字通过"(-"和"-)"包起来,例如 <string name="SmartTextView">(-S-)mart(-T-)ext(-V-)(-iew-)</string>
#### 2.通过SmartText添加SmartTextStyle对"(- -)"里面中的内容设置颜色 以及增加点击事件。点击事件和文字下划线都是可选功能
#### 一.需要将strings.xml文件中的文字通过"(-"和"-)"包起来
例如 <string name="SmartTextView">(-S-)mart(-T-)ext(-V-)(-iew-)</string>
#### 二.通过SmartText添加SmartTextStyle对"(- -)"里面中的内容设置颜色 以及增加点击事件。
点击事件和文字下划线都是可选功能,如下所示
```
SmartText smartText = new SmartText(tv1, getResources().getString(R.string.SmartTextView));
smartText
Expand Down

0 comments on commit dd574bd

Please sign in to comment.