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 {
28
28
29
29
# How to use
30
30
31
- ## Using Truss:
31
+ ## Using Truss
32
32
33
33
` Truss ` returns a ` CharSequence ` . There are 2 ways of using it:
34
34
@@ -164,6 +164,8 @@ textView.setText(new Truss()
164
164
165
165
Here are some code snippets for `Snippety ` spans (tongue twister : D )
166
166
167
+ ## Text Helper Spans
168
+
167
169
- Typeface
168
170
169
171
```java
@@ -248,6 +250,8 @@ textView.setText(new Truss()
248
250
.build());
249
251
```
250
252
253
+ ## HTML Helper Spans
254
+
251
255
- Ordered List
252
256
253
257
```java
@@ -285,6 +289,16 @@ textView.setText(new Truss()
285
289
.build());
286
290
```
287
291
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
+
288
302
# Reference
289
303
290
304
- [JakeWharton / Truss . java](https: // gist.github.com/JakeWharton/11274467)
You can’t perform that action at this time.
0 commit comments