Phonegap Application text and layout too small

后端 未结 7 2160
情深已故
情深已故 2020-12-02 05:24

I recently build an android app using html, css, javascript and running them through phonegap to create the actual app. One of the problems I encountered in one phone is tha

相关标签:
7条回答
  • 2020-12-02 06:05

    Updated answer: for Android

    The problem is on Android devices has this Accessibilly settings, You can try to change font-size (search font size on android setting) and run you app again.

    So your fonts on app will be changed as your setting


    So here is a solution for Cordova

    Use : mobile-accessibility to disabling PreferredTextZoom

    Install mobile-accessibility on your Cordova project

    $ cordova plugin add https://github.com/phonegap/phonegap-mobile-accessibility.git
    

    And JS part is something like :

    document.addEventListener("deviceready", onDeviceReady, false);
    function onDeviceReady() {
       if (window.MobileAccessibility) {
          window.MobileAccessibility.usePreferredTextZoom(false);
       }
    }
    
    0 讨论(0)
提交回复
热议问题