Skip to content

Commit

Permalink
Update README.md: Docs for spanned text
Browse files Browse the repository at this point in the history
  • Loading branch information
PatilShreyas committed Apr 25, 2021
1 parent 8caa675 commit 2d79eda
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,11 +218,11 @@ If it's not provided in builder, `TextAlignment.CENTER` is considered by default

### HTML formatting for Message

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.
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.

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

<a name="showAnims"></a>
Expand Down Expand Up @@ -256,9 +256,7 @@ Prototype :
Resource file should be passed to method. e.g. `R.raw.delete_anim`.
```java
MaterialButton mDialog = new MaterialDialog.Builder(this)
// Other Methods to create Dialog........
.setAnimation(R.raw.delete_anim)
//...
.setAnimation(R.raw.delete_anim)
```
<a name="showAnimFile"></a>
#### ii. Using `Asset` File
Expand Down

0 comments on commit 2d79eda

Please sign in to comment.