How do you get the text of a TextView to be Justified (with text flush on the left- and right- hand sides)?
I found a possible solution here, but it do
TextView in Android O offers full justification (new typographic alignment) itself.
You just need to do this:
Kotlin
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
textView.justificationMode = JUSTIFICATION_MODE_INTER_WORD
}
Java
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
textView.setJustificationMode(JUSTIFICATION_MODE_INTER_WORD);
}
default is JUSTIFICATION_MODE_NONE.