android studio text alignment code example
Example 1: android studio text alignment center
set the 'gravity' attribute center_horizontal and center_vertical
Example 2: android kotlin center text
// Centering text in kotlin for android
// like this
android:textAlignment="center"