AsciiArtView
This library provide to draw AsciiArt.
Download
Gradle
- add JitPack repository to your project root
build.gradle
.
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
compile 'com.github.chuross:asciiartview:x.x.x
}
Usage
monafont
into assets directory
This library depends monafont
.
http://monafont.sourceforge.net/
Layout XML
<com.github.chuross.asciiartview.AsciiArtView
android:id="@+id/asciiart"
android:layout_width="match_parent"
android:layout_height="wrap_content" />
Code
val yourAsciiArtData: String = ... // from assets or network or...
val asciiArtView: AsciiArtView = findViewById(R.id.asciiart)
asciiArtView.setAsciiArt(yourAsciiArtData)
asciiArtView.setTypeface(Typeface.createFromAsset(assets, "mona.ttf"))
XML Attributes
name | type | description | etc |
---|---|---|---|
aav_color | color | ||
aav_typeface | string |