0

Very straight forward question.
Is possible to justify the message content in the MaterialAlertDialog I find really absurd that 2021 google/android fights to do simple text processing that any "microsoft word" would do in 1991

Is there any way to achieve it without create a custom TextView and insert it in the dialog manually?

NearHuscarl
  • 66,950
  • 18
  • 261
  • 230
Rafael Lima
  • 3,079
  • 3
  • 41
  • 105
  • I do not see anything named `MaterialAlertDialog`. Are you referring to `MaterialAlertDialogBuilder` by any chance? If so, it looks like your options are based on the text appearances that you provide via `materialAlertDialogTitleTextStyle` and `materialAlertDialogBodyTextStyle` -- see https://stackoverflow.com/q/56905297/115145 for some examples. – CommonsWare Oct 07 '21 at 23:51
  • @CommonsWare so how to set the text appearances to be justified? – Rafael Lima Oct 08 '21 at 00:03
  • 1
    I have not considered text justification in Android in years. To me, it is doomed to look bad on some combinations of text, locale, available space, and font scale. But, based on a quick search, it looks like you could try [setting `android:justificationMode`](https://developer.android.com/reference/kotlin/android/widget/TextView#android:justificationmode) in your dialog's theme, on Android 8.0+. – CommonsWare Oct 08 '21 at 00:09
  • Appreciated, and in imho non justified text looks bad in any combination of size/space it resembles very much a kid writing without care – Rafael Lima Oct 08 '21 at 00:15

0 Answers0