Search code examples
csscordovaionic-frameworkdpi

"large text" option in Android device make my text in app bigger with ionic/cordova


I created a beautiful app for my ios device. I tried it on my android device, and i saw that my text was bigger then iOS device. I found the problem is the "large text" option actived on my device. How can i resolve the problem of the big text on ionic/cordova app with this option enabled?


Solution

  • You will need to use this plugin: https://github.com/phonegap/phonegap-mobile-accessibility

    Then add the following to your $ionicPlatform.ready callback:

    $ionicPlatform.ready(function(){
        if($window.MobileAccessibility){
            $window.MobileAccessibility.usePreferredTextZoom(false);
        }
    });
    

    This will ignore the text zoom set in accessibility options on a device.