File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff 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
165165Here 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)
You can’t perform that action at this time.
0 commit comments