android studio centering textview in relativelayout

Java
android:layout_centerHorizontal="true"
Source

Also in Java: