Skip to content

Commit e0a85e4

Browse files
authored
README.md update
1 parent 611d408 commit e0a85e4

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

README.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ There is no need to add every special character by [Unicode](https://www.w3schoo
1717
### Kotlin String interpolation
1818
When building equations in Kotlin sometimes double backslash is needed to escape Kotlin String Interpolation
1919
```kotlin
20-
var math = "$\\F&#2196{&#x2192}=ma_g$"
20+
var math = "$\\F&#x2196{&#x2192}=ma_g$"
2121
```
2222
# Demo
2323
![Demo RecyclerView](/MathViewGif.gif)
@@ -33,7 +33,7 @@ repositories {
3333
```
3434
```groovy
3535
dependencies {
36-
implementation 'com.github.jstarczewski:MathView:0.3.0'
36+
implementation 'com.github.jstarczewski:MathView:0.4.0'
3737
}
3838
```
3939
# Usage
@@ -56,7 +56,7 @@ dependencies {
5656
textColor = Color.GREEN.toString()
5757
backgroundColor = Color.WHITE
5858
text = "$\\F&#x2196{&#x2192}=ma_g$"
59-
}.update()
59+
}
6060
6161
```
6262
## Set text directly in xml
@@ -76,15 +76,13 @@ While setting text directly in XML, remember to encode HTML special characters,
7676
There are currently five custom functions available for the user. I plan to refactor them to fit more in Kotlin style.
7777

7878
```kotlin
79-
// Apply properties, then call update()
79+
// Apply properties
8080
var mathView : MathView = findViewById<MathView>(R.id.mvEditTextExample)
8181
mathView.apply {
8282
text = "$\\F=10$" // sets text
8383
textColor = "red" // sets text color, default value is "black"
8484
backgroundColor = "blue" // sets background color, default value is "white"
85-
}.update() // updates changes
86-
87-
// There is no need to call update() after setting textZoom property
85+
}
8886
mathView.textZoom = 120 // set text size based on pixel density, default value is 100 (%)
8987
```
9088

@@ -94,4 +92,4 @@ Back in 2016 I created an Android App which contained a lot of equations rendere
9492

9593

9694
# Contributing
97-
Feel free to contribute and report issues. Feedback appreciated
95+
Feel free to contribute and report issues. Feedback appreciated!

0 commit comments

Comments
 (0)