Hello everyone!
If you use Jetpack Compose in your app and want to display different types of equation - welcome! I started to create native library for displaying equations, using Compose.
The main goal is create DSL based on only one object - EquationItem
. You can create and decorate this object for displaying different types of equations. By nesting one object into another, you get more variety.
- For display simplest example, add
EquationItem
object, set value in constructor and call compose functionsShow()
on the object:
EquationItem
has different parameters in constructor. Couple examples below:
- You can mix parameters incide
EquationItem
and include oneEquationItem
inside another. But don't callShow()
on inner EquationItems, it won't work!
- You can place list incide
EquationItem
component. Also, note, thatShow()
function can take insideFontParams
for decorate your equation visibility:
- Finally, more complex example:
- min sdk version: 21
- target sdk version: 32
If you project use gradle version '7.1.0'
or higher, add maven { url 'https://jitpack.io' }
in your root settings.gradle
file:
dependencyResolutionManagement {
...
repositories {
...
maven { url 'https://jitpack.io' }
}
}
If you gradle version is lower, add it in your root build.gradle
at the end of repositories:
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Finally, add dependency 'com.github.vkochenkov:EquationDisplayer:1.2'
in build.gradle
dependencies section:
dependencies {
...
implementation 'com.github.vkochenkov:EquationDisplayer:1.2'
}
I will be glad to hear any feedback from you. Please, connect me by email [email protected]