How to Align Android TextView in the Center of the Screen
http://www.viralandroid.com/2015/10/how-to-align-android-textview-in-the-center-of-screen.html
In this simple tip, I will show you to align android TextView in the center of the screen. To align android textview in the center of screen, you have to use android:gravity=”center” xml attribute.
Related:
Programmatically Align Android TextView in the Center of the Screen
How to Set Android Button and TextView Border Color
How to Implement Ripple Effect in Android
XML Layout File
Following is the code of xml layout file.
res/layout/textview_center.xml
Output:
Related:
Programmatically Align Android TextView in the Center of the Screen
How to Set Android Button and TextView Border Color
How to Implement Ripple Effect in Android
XML Layout File
Following is the code of xml layout file.
res/layout/textview_center.xml
Output:
Android TextView in the Center of the Screen |