align text in android studio code example
Example 1: android studio text alignment center
set the 'gravity' attribute center_horizontal and center_vertical
Example 2: textview center text
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="@string/**yourtextstring**"
/>