8

I am trying to create app which provide text formatting (like font style , font size , font color). So I want default fonts provided by android as a list to be shown in drop-down. Selecting font from drop-down will change the Text dynamically. Can anyone help , how can I achieve this either via XML or programmatically ?

See the image how it must look like

enter image description here

Pallavi
  • 652
  • 1
  • 10
  • 26

2 Answers2

3

font list is saved in Typeface class as a static field Map<Stirng, Typeface> sSystemFontMap. you just need to get this field. See my answer here.

Community
  • 1
  • 1
liao
  • 156
  • 1
  • 5
2

There are only three system wide fonts in Android SDK.

  • normal

  • serif

  • monospace

More info : click here

Community
  • 1
  • 1
Sathish Kumar J
  • 4,280
  • 1
  • 20
  • 48