PandaText for Android
An Android View with the platform’s own input, selection and accessibility.
Get started
Install the package, then load your fonts, create a view and set the text. Package sources come with early access.
Android
Requires: Android 8 (API 26) or later; arm64-v8a and x86_64.
1 Install
Add the repository in settings.gradle.kts:
dependencyResolutionManagement {
repositories {
google()
mavenCentral()
maven { url = uri("<repository URL from your early-access email>") }
}
}Then the dependency in app/build.gradle.kts:
dependencies {
implementation("dev.pandatext:PandaTextView:0.1.0")
}Put your font files in src/main/assets and read their bytes with assets.open(…).readBytes().
2 Create the view
The view for Android, in Kotlin.
val font = Font(fontBytes)
val family = FontFamily(listOf(font))
val collection = FontCollection(listOf(family))
val textView = PandaTextView(context)
textView.fontCollection = collection
textView.text = "Hello PandaText"API
After setup, every call does the same job on every platform. Open the Editor API for Android.