Android Tips: Centering TextView

Trying to figure out how to align a text inside a TextView for Android.

Found the answer on StackOverflow

<TextView
android:textAlignment=”center”
android:layout_gravity=”center_horizontal|center”

Center TextView

Tony Tam

Senior Principal Architect @ Splunk Founder of ImpactfulEngineer.org & SFBadminton.org