Loading...

Android TextView Example

Android TextView allows you to display text in android application. In this tutorial, you will learn to use TextView in android and set the text color, gravity center, make text bold and change the size of font.

Related:
Programmatically Align Android TextView in the Center of the Screen
How to Make Scrollable TextView in Android
How to Set Android Button and TextView Border Color
Buttons - Android Button Examples

Android Example: How to use TextView in Android


XML Layout File

res/layout/textview_example.xml

Java Activity File

src/MainActivity.java

Now, run your application which will look like output given below.

Output:

Android TextView Example
TextView

UI 8763116507967214160
Home item