android - TextView bold via XML file?

ID : 20343

viewed : 29

Tags : androidtextviewresourcesandroid

Top 5 Answer for android - TextView bold via XML file?

vote vote

97

I have a project in which I have the following TextView :

<TextView     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:textStyle="bold"     android:text="@string/app_name"     android:layout_gravity="center"  /> 

So, I'm guessing you need to use android:textStyle

vote vote

80

just use

android:textStyle="bold" 
vote vote

71

Example:

use: android:textStyle="bold"

 <TextView     android:id="@+id/txtVelocidade"     android:layout_width="wrap_content"     android:layout_height="wrap_content"     android:layout_above="@+id/txtlatitude"     android:layout_centerHorizontal="true"     android:layout_marginBottom="34dp"     android:textStyle="bold"     android:text="Aguardando GPS"     android:textAppearance="?android:attr/textAppearanceLarge" /> 
vote vote

67

use textstyle property as bold

android:textStyle = "bold"; 
vote vote

50

Use android:textStyle="bold"

4 ways to make Android TextView Bold

like this

<TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:textSize="12dip" android:textStyle="bold" /> 

There are many ways to make Android TextView bold.

Top 3 video Explaining android - TextView bold via XML file?

Related QUESTION?