@@ -17,7 +17,7 @@ There is no need to add every special character by [Unicode](https://www.w3schoo
17
17
### Kotlin String interpolation
18
18
When building equations in Kotlin sometimes double backslash is needed to escape Kotlin String Interpolation
19
19
```kotlin
20
- var math = "$\\F࢔ {→}=ma_g$"
20
+ var math = "$\\F↖ {→}=ma_g$"
21
21
```
22
22
# Demo
23
23

@@ -33,7 +33,7 @@ repositories {
33
33
```
34
34
```groovy
35
35
dependencies {
36
- implementation 'com.github.jstarczewski:MathView:0.3 .0'
36
+ implementation 'com.github.jstarczewski:MathView:0.4 .0'
37
37
}
38
38
```
39
39
# Usage
@@ -56,7 +56,7 @@ dependencies {
56
56
textColor = Color.GREEN.toString()
57
57
backgroundColor = Color.WHITE
58
58
text = "$\\F↖{→}=ma_g$"
59
- }.update()
59
+ }
60
60
61
61
```
62
62
## Set text directly in xml
@@ -76,15 +76,13 @@ While setting text directly in XML, remember to encode HTML special characters,
76
76
There are currently five custom functions available for the user. I plan to refactor them to fit more in Kotlin style.
77
77
78
78
``` kotlin
79
- // Apply properties, then call update()
79
+ // Apply properties
80
80
var mathView : MathView = findViewById<MathView >(R .id.mvEditTextExample)
81
81
mathView.apply {
82
82
text = " $\\ F=10$" // sets text
83
83
textColor = " red" // sets text color, default value is "black"
84
84
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
+ }
88
86
mathView.textZoom = 120 // set text size based on pixel density, default value is 100 (%)
89
87
```
90
88
@@ -94,4 +92,4 @@ Back in 2016 I created an Android App which contained a lot of equations rendere
94
92
95
93
96
94
# Contributing
97
- Feel free to contribute and report issues. Feedback appreciated
95
+ Feel free to contribute and report issues. Feedback appreciated!
0 commit comments