Skip to content

Commit 2d79eda

Browse files
committed
Update README.md: Docs for spanned text
1 parent 8caa675 commit 2d79eda

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

README.md

+3-5
Original file line numberDiff line numberDiff line change
@@ -218,11 +218,11 @@ If it's not provided in builder, `TextAlignment.CENTER` is considered by default
218218

219219
### HTML formatting for Message
220220

221-
HTML span formatting is supported only for dialog's ***message***. While setting a message, you can directly provide formatted string as shown in following example.
221+
HTML spanned text is supported only for dialog's ***message***. While setting a message, you can directly provide `Spanned` instance as shown in following example.
222222

223223
```java
224224
MaterialDialog mDialog = new MaterialDialog.Builder(this)
225-
.setMessage("<b>Lorem <i>Ipsum</i></b>. Click <a href=\"https://example.com\">here</a> for more information")
225+
.setMessage(Html.fromText("<b>Lorem <i>Ipsum</i></b>. <br> Click <a href=\"https://example.com\">here</a> for more information"))
226226
```
227227

228228
<a name="showAnims"></a>
@@ -256,9 +256,7 @@ Prototype :
256256
Resource file should be passed to method. e.g. `R.raw.delete_anim`.
257257
```java
258258
MaterialButton mDialog = new MaterialDialog.Builder(this)
259-
// Other Methods to create Dialog........
260-
.setAnimation(R.raw.delete_anim)
261-
//...
259+
.setAnimation(R.raw.delete_anim)
262260
```
263261
<a name="showAnimFile"></a>
264262
#### ii. Using `Asset` File

0 commit comments

Comments
 (0)