mardi 12 mai 2015

change fontFamily of TextView in Android

I like to change the android:fontFamily in Android but I don't see any pre-defined fonts in Android. How to select one of the pre-defined ones? I don't really need to define my own TypeFace but all I need is something different from what it shows right now.

<TextView
  android:id="@+id/TextView1"
  android:layout_width="wrap_content"
  android:layout_height="wrap_content"
  android:gravity="center"
  android:text="Change Font"
  android:textSize="40sp"
  android:fontFamily="Verdana"
 />

It seems what I did up there won't really work! BTW android:fontFamily="Verdana" was a stupid attempt!

Aucun commentaire:

Enregistrer un commentaire