Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

How to Center Android TextView Text Horizontally and Vertically

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

Share the post

How to Center Android TextView Text Horizontally and Vertically

×

Subscribe to Viral Android – Tutorials, Examples, Ux/ui Desig

Get updates delivered right to your inbox!

Thank you for your subscription

×