Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detect if "Large Text" accessibility option is enabled on Android

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

like image 891
Gallal Avatar asked Aug 06 '12 10:08

Gallal


1 Answers

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.

like image 179
nandeesh Avatar answered Sep 21 '22 17:09

nandeesh