16

How can I programatically detect if "Large Text" accessibility option is enabled on Android?

rds
  • 26,253
  • 19
  • 107
  • 134
Gallal
  • 4,267
  • 6
  • 38
  • 61

1 Answers1

35

if Large Text is set, android changes the font scale , so you can detect using

Configuration c = getResources().getConfiguration();
float scale = c.fontScale;

if scale is greater than 1 then it is large text.

laalto
  • 150,114
  • 66
  • 286
  • 303
nandeesh
  • 24,740
  • 6
  • 69
  • 79