PhoneGap的 - 忽略字体大小显示在Android设置 [英] Phonegap - Ignore font-size display setting on Android
问题描述
我改变字体大小显示通过配置设置时,有一些Android设备的问题。
I'm having an issue with some android devices when changing the font-size display setting through configuration.
在Web浏览器中我的应用程序很简单忽略这一点。这是一些其他的手机太真。
In web browser my app is simple ignoring this. This is true for some other mobiles too.
但随着一些特定的手机(如摩托罗拉G或X)更改此配置也影响了我的PhoneGap的应用程序。
But with some specific mobiles (like Motorola G or X) changing this config also affects my Phonegap app.
我不知道如何避免这个问题,使应用程序看起来一致
I don't know how to avoid this to make the app look consistent
推荐答案
我发现使用此插件科尔多瓦的解决方案:的 com.phonegap.plugin.mobile无障碍
I've found a solution using this cordova plugin: com.phonegap.plugin.mobile-accessibility
您必须遵守该插件的安装说明,然后你可以使用它离子应用程序内。你只需要确保科尔多瓦'deviceready'回调(由$ ionicPlatform.ready在下面的例子accesed)之后调用其功能:
You have to follow installation instructions for the plugin, and then you can use it inside Ionic app. You only have to ensure to call its functions after Cordova 'deviceready' callback (accesed by $ionicPlatform.ready in the example below):
angular.module('app').controller('IndexController', function ($ionicPlatform, $window) {
$ionicPlatform.ready(function(){
if($window.MobileAccessibility){
$window.MobileAccessibility.usePreferredTextZoom(false);
}
});
});
这篇关于PhoneGap的 - 忽略字体大小显示在Android设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!