سؤال

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

هل كانت مفيدة؟

المحلول

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top