textsize

Android Textview Font

In Android, we can set the font to textview by using the textview property.

  • 'android:textSize' for Textview Size
  • 'android:textStyle' for Textview Text Style
  • 'android:typeface' for Textview Font Style

Textview Font Example -

[sourcecode language="xml"]

<TextView android:text="@+id/TextView01"
android:id="@+id/TextView01"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textSize="20px"
android:textStyle="bold"
android:typeface="s

Android Text Color

In Android, we can set text color for textview, edittext, buttons, etc...

Example:-

Input

Output

Android Textview Tutorial

In this tutorial, we are going to learn about TextView.

In Android if we start any application, we may need to use TextView.

Textview is a View which we can add to any Layout.

How to add TextView in a Layout?

To add a textview to a layout, select the layout you need to add (here I have selected LinearLayout01) & then click the Add Button (shown in green color with plus symbol intimating "Adds a new element")

Syndicate content