Monday 15 March 2010

jquery - How to ignore font-size setting changes for Cordova App when runs on Android 4.4+? -



jquery - How to ignore font-size setting changes for Cordova App when runs on Android 4.4+? -

i've developed cordova app cordova version 3.6.3 , jquery. 1 problem still can't best solutions when test app on android 4.4+ , there users love alter font size in setting > display > font-size of device larger normal. causes app layout displays ugly (the best display when font-size setting normal only). there no effect of font-size setting android older 4.4 (4.3,4.2...) app displays on older version.

the solutions i've applied app creating custom plugin observe configuration changed , detects if user uses android 4.4+ , if set font-size setting not normal, i'll utilize jquery forcefulness font-size specified size.

example is....

if (font_scale == huge) { $("div").css("font-size","20px !important"); }

this works fine after page loaded, css doesn't changes want. , suppose if there 30 divs+ on page must insert statement above 30 times , takes much time needlessly.

i want know, there ways solve problem easier using plugin? maybe using xml configuration or css3 properties can makes app displays without side effect font-size setting of android 4.4?

another ways tried , doesn't works

inserting fontscale on androidmanifest.xml > activity tag inserting webkit-text-size-adjust:none; in css

i'd love hear ideas help solve this.

try remove 1 index.html:

target-densitydpi=device-dpi

good luck.

android jquery cordova android-4.4-kitkat

No comments:

Post a Comment