In this simple tip, I am going to show how to align Android Textview text at the center of screen (horizontally and vertically) using XML attribute and programmatically (using java code). You can also center a view or views content i.e. textview or button vertically and horizontally. To make all these using XML, you have to use layout_gravity attribute. You can also do same thing
This post first appeared on Viral Android – Tutorials, Examples, UX/UI Desig, please read the originial post: here