Skip to content

Commit 4bb9914

Browse files
author
chetan-fueled
committed
docs(README.md): horizontal line
1 parent 73a333f commit 4bb9914

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dependencies {
2828

2929
# How to use
3030

31-
## Using Truss:
31+
## Using Truss
3232

3333
`Truss` returns a `CharSequence`. There are 2 ways of using it:
3434

@@ -164,6 +164,8 @@ textView.setText(new Truss()
164164

165165
Here are some code snippets for `Snippety` spans (tongue twister :D)
166166

167+
## Text Helper Spans
168+
167169
- Typeface
168170

169171
```java
@@ -248,6 +250,8 @@ textView.setText(new Truss()
248250
.build());
249251
```
250252

253+
## HTML Helper Spans
254+
251255
- Ordered List
252256

253257
```java
@@ -285,6 +289,16 @@ textView.setText(new Truss()
285289
.build());
286290
```
287291

292+
- Horizontal Line
293+
294+
```java
295+
int oneDp = getResources().getDimensionPixelOffset(R.dimen.one_dp);
296+
int colorGrey = ContextCompat.getColor(getContext(), R.color.grey_light);
297+
textView.setText(new Truss()
298+
.appendln(new Snippety().hr(oneDp, colorGrey))
299+
.build());
300+
```
301+
288302
# Reference
289303

290304
- [JakeWharton/Truss.java](https://gist.github.com/JakeWharton/11274467)

0 commit comments

Comments
 (0)