How to center TextView Horizontally and Vertically

Опубликовано: 30 Сентябрь 2024
на канале: ID
20,266
52

How to center TextView Horizontally and Vertically

Take your app to the top keyword installs: http://bit.ly/2Xyg176

Recommended way to get genuine real and safest reviews: http://bit.ly/2XDZlpD

Recommended way to boost your apps ranking: http://bit.ly/2G3nMa7

Recommended Best Ads Mediation Network: http://bit.ly/2JpoeSl

Recommended book about the app market: https://amzn.to/2JDjojo

Subscribe To My Channel and Get More Great Tutorials
http://www.youtube.com/subscription_c...
In android programming, the ui of an app is the first and most attractive thing that brings users to get your app,and to achieve a good design you need to know about android layout, its called also a view group.

Android layout is the most useful view element container in android programming, it groups all view elements offered by android like text box, buttons , labels…etc, all layouts of an app are contained in a file location named : res/layout .

An android activity uses layouts to shows output and ui element on the screen.,the most used layout are : linear layout and relative layout.

One of the problems that face developers when using this layouts , is centering elements . this example will give you the solution, on how to center a view or its content by using example of a textview , we will center text horizontally and vertically using different tricks.

The source code is available at http://www.indragni.com/android/Cente...

---------------------------------------­-----------
:





How to center TextView Horizontally and Vertically